File: gstbus.override
Function: _wrap_gst_bus_set_sync_handler
Error: ob_refcnt of '*data' is 1 too high
155 static PyObject *
156 _wrap_gst_bus_set_sync_handler (PyGObject *self, PyObject *args)
157 {
158     PyObject *callback = NULL;
159     PyObject *cbargs = NULL;
160     PyObject *data = NULL;
161     PyObject *old_data = NULL;
162     gint len;
163     static GQuark sync_handler_data_quark = 0;
164 
165     len = PyTuple_Size(args);
when PyTuple_Size() returns ob_size
166 
167     if (len < 1) {
when considering range: 1 <= value <= 0x7fffffff
taking False path
168 	PyErr_SetString(PyExc_TypeError, "Bus requires at least 1 arg");
169 	return NULL;
170     }
171 
172     if (sync_handler_data_quark == 0)
when considering value == (GQuark)0 from gstbus.override:157
taking True path
173 	sync_handler_data_quark = \
174 			g_quark_from_static_string("PyGst::BusSyncHandlerData");
175 
176     callback = PySequence_GetItem(args, 0);
when PySequence_GetItem() succeeds
177     if (callback != Py_None) {
taking True path
178 	if (!PyCallable_Check(callback)) {
when PyCallable_Check() returns 1 (true)
taking False path
179 	    Py_DECREF (callback);
180 	    PyErr_SetString(PyExc_TypeError, "callback is not callable");
181 	    return NULL;
182 	}
183 
184 	cbargs = PySequence_GetSlice(args, 1, len);
when PySequence_GetSlice() succeeds
185 	if (cbargs == NULL) {
taking False path
186 	    Py_DECREF (callback);
187 	    return NULL;
188 	}
189 
190 	data = Py_BuildValue("(ON)", callback, cbargs);
when Py_BuildValue() succeeds
new ref from call to Py_BuildValue allocated at: 	data = Py_BuildValue("(ON)", callback, cbargs);
ob_refcnt is now refs: 1 + N where N >= 0
191 	Py_DECREF (cbargs);
when taking False path
calling tp_dealloc on new ref from PySequence_GetSlice allocated at gstbus.override:184
192 	if (data == NULL) {
taking False path
193 	    Py_DECREF (callback);
194 	    return NULL;
195 	}
196 
197 	old_data = g_object_get_qdata (self->obj, sync_handler_data_quark);
198 	if (old_data != NULL) {
when treating unknown void * from gstbus.override:197 as non-NULL
taking True path
199 	   Py_DECREF (old_data);
when considering range: -0x8000000000000000 <= value <= -1
taking True path
200 	}
201 
202 	g_object_set_qdata (self->obj, sync_handler_data_quark, data);
203 
204 	gst_bus_set_sync_handler (GST_BUS (self->obj),
205 				  (GstBusSyncHandler) bus_sync_handler,
206 				  data);
207     } else {
208 	old_data = g_object_get_qdata (self->obj, sync_handler_data_quark);
209 	if (old_data != NULL) {
210 	    Py_DECREF (old_data);
211 	}
212 
213 	g_object_set_qdata (self->obj, sync_handler_data_quark, NULL);
214 
215 	gst_bus_set_sync_handler (GST_BUS (self->obj), NULL, NULL);
216     }
217 
218     Py_DECREF (callback);
when taking True path
219 
220     Py_INCREF(Py_None);
221     return Py_None;
222 }
ob_refcnt of '*data' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
found 11 similar trace(s) to this

File: gstbus.override
Function: _wrap_gst_bus_set_sync_handler
Error: ob_refcnt of '*cbargs' is 1 too low
155 static PyObject *
156 _wrap_gst_bus_set_sync_handler (PyGObject *self, PyObject *args)
157 {
158     PyObject *callback = NULL;
159     PyObject *cbargs = NULL;
160     PyObject *data = NULL;
161     PyObject *old_data = NULL;
162     gint len;
163     static GQuark sync_handler_data_quark = 0;
164 
165     len = PyTuple_Size(args);
when PyTuple_Size() returns ob_size
166 
167     if (len < 1) {
when considering range: 1 <= value <= 0x7fffffff
taking False path
168 	PyErr_SetString(PyExc_TypeError, "Bus requires at least 1 arg");
169 	return NULL;
170     }
171 
172     if (sync_handler_data_quark == 0)
when considering value == (GQuark)0 from gstbus.override:157
taking True path
173 	sync_handler_data_quark = \
174 			g_quark_from_static_string("PyGst::BusSyncHandlerData");
175 
176     callback = PySequence_GetItem(args, 0);
when PySequence_GetItem() succeeds
177     if (callback != Py_None) {
taking True path
178 	if (!PyCallable_Check(callback)) {
when PyCallable_Check() returns 1 (true)
taking False path
179 	    Py_DECREF (callback);
180 	    PyErr_SetString(PyExc_TypeError, "callback is not callable");
181 	    return NULL;
182 	}
183 
184 	cbargs = PySequence_GetSlice(args, 1, len);
when PySequence_GetSlice() succeeds
new ref from PySequence_GetSlice allocated at: 	cbargs = PySequence_GetSlice(args, 1, len);
ob_refcnt is now refs: 1 + N where N >= 0
185 	if (cbargs == NULL) {
taking False path
186 	    Py_DECREF (callback);
187 	    return NULL;
188 	}
189 
190 	data = Py_BuildValue("(ON)", callback, cbargs);
when Py_BuildValue() succeeds
ob_refcnt is now refs: 0 + N where N >= 1
191 	Py_DECREF (cbargs);
when taking True path
ob_refcnt is now refs: -1 + N where N >= 1
192 	if (data == NULL) {
taking False path
193 	    Py_DECREF (callback);
194 	    return NULL;
195 	}
196 
197 	old_data = g_object_get_qdata (self->obj, sync_handler_data_quark);
198 	if (old_data != NULL) {
when treating unknown void * from gstbus.override:197 as non-NULL
taking True path
199 	   Py_DECREF (old_data);
when considering range: -0x8000000000000000 <= value <= -1
taking True path
200 	}
201 
202 	g_object_set_qdata (self->obj, sync_handler_data_quark, data);
203 
204 	gst_bus_set_sync_handler (GST_BUS (self->obj),
205 				  (GstBusSyncHandler) bus_sync_handler,
206 				  data);
207     } else {
208 	old_data = g_object_get_qdata (self->obj, sync_handler_data_quark);
209 	if (old_data != NULL) {
210 	    Py_DECREF (old_data);
211 	}
212 
213 	g_object_set_qdata (self->obj, sync_handler_data_quark, NULL);
214 
215 	gst_bus_set_sync_handler (GST_BUS (self->obj), NULL, NULL);
216     }
217 
218     Py_DECREF (callback);
when taking True path
219 
220     Py_INCREF(Py_None);
221     return Py_None;
222 }
ob_refcnt of '*cbargs' is 1 too low
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + -1
found 7 similar trace(s) to this