File: zencoding.c
Function: zencoding_run_action
Error: ob_refcnt of '*ptr' is 1 too high
65 static void
66 zencoding_run_action(Tdocument *doc, const gchar *action_name)
67 {
68 	PyObject *result;
69 	PyObject *ptr;
70 	if (!zencoding.module || !zencoding.editor) {
when treating unknown struct PyObject * from zencoding.c:70 as non-NULL
taking False path
when treating unknown struct PyObject * from zencoding.c:70 as non-NULL
taking False path
71 		if (!init_python())
72 			return;
73 	}
74 	ptr = PyLong_FromVoidPtr((void *) doc);
when PyLong_FromVoidPtr() succeeds
PyLongObject allocated at: 	ptr = PyLong_FromVoidPtr((void *) doc);
ob_refcnt is now refs: 1 + N where N >= 0
75 	DEBUG_MSG("zencoding_run_action, calling set_context for document %p wrapped in python object %p\n",doc, ptr);
76 	result = PyObject_CallMethod(zencoding.editor, "set_context", "O", ptr);
when PyObject_CallMethod() fails
77 	if (!result) {
taking True path
78 		if (PyErr_Occurred()) PyErr_Print();
PyErr_Occurred()
taking True path
calling PyErr_Print()
79 		DEBUG_MSG("zencoding_run_action, failed to call set_context()\n");
80 		return;
81 	}
82 	Py_XDECREF(result);
83 	Py_XDECREF(ptr);
84 	result = PyObject_CallMethod(zencoding.module, "run_action", "sO", action_name, zencoding.editor);
85 	if (!result) {
86 		if (PyErr_Occurred()) PyErr_Print();
87 		DEBUG_MSG("failed to call run_action(%s)\n",action_name);
88 	}
89 	Py_XDECREF(result);
90 }
ob_refcnt of '*ptr' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1