]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/python/py-event.c
Turn gdbpy_ref into a template
[thirdparty/binutils-gdb.git] / gdb / python / py-event.c
index a50da1f99d58bc2a068dfeda7f7df65d4e2f90e9..161a5e1289746532ce302e90d5b3094ca491261b 100644 (file)
@@ -95,7 +95,7 @@ evpy_emit_event (PyObject *event,
      notifying listeners to avoid skipping callbacks
      in the case of a callback being disconnected during
      a notification.  */
-  gdbpy_ref callback_list_copy (PySequence_List (registry->callbacks));
+  gdbpy_ref<> callback_list_copy (PySequence_List (registry->callbacks));
   if (callback_list_copy == NULL)
     return -1;
 
@@ -106,7 +106,8 @@ evpy_emit_event (PyObject *event,
       if (func == NULL)
        return -1;
 
-      gdbpy_ref func_result (PyObject_CallFunctionObjArgs (func, event, NULL));
+      gdbpy_ref<> func_result (PyObject_CallFunctionObjArgs (func, event,
+                                                            NULL));
 
       if (func_result == NULL)
        {