Selaa lähdekoodia

PyObject_GetAttr increases the refcnt of py_attr_hook_handler_name by one.

Sander Mathijs van Veen 14 vuotta sitten
vanhempi
sitoutus
4fac41ac1c
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      src/c/bison_callback.c

+ 4 - 0
src/c/bison_callback.c

@@ -111,6 +111,10 @@ PyObject* py_callback(PyObject *parser, char *target, int option, int nargs,
         return res;
     }
 
+    // XXX: PyObject_GetAttr increases the refcnt of py_attr_hook_handler_name
+    // by one.
+    //debug_refcnt(py_attr_hook_handler_name, 1);
+
     // Call the "hook_handler" callback
     arglist = Py_BuildValue("(siOOO)", target, option, names, values, res);
     if (unlikely(!arglist)) { Py_DECREF(handle); return res; }