2288 static PyObject *
2289 pa_get_stream_write_available(PyObject *self, PyObject *args)
2290 {
2291 signed long frames;
2292 PyObject *stream_arg;
2293 _pyAudio_Stream *streamObject;
2294
2295 if (!PyArg_ParseTuple(args, "O!", &_pyAudio_StreamType, &stream_arg))
when PyArg_ParseTuple() succeeds
taking False path
2296 return NULL;
2297
2298 streamObject = (_pyAudio_Stream *) stream_arg;
2299
2300 if (!_is_open(streamObject)) {
when considering value == (int)0 from _portaudiomodule.c:2300
taking True path
2301 PyErr_SetObject(PyExc_IOError,
when Py_BuildValue() succeeds
calling PyErr_SetObject()
new ref from call to Py_BuildValue allocated at: PyErr_SetObject(PyExc_IOError,
ob_refcnt is now refs: 1 + N where N >= 0
ob_refcnt is now refs: 1 + N where N >= 1
2302 Py_BuildValue("(s,i)",
2303 "Stream closed",
2304 paBadStreamPtr));
2305 return NULL;
2306 }
2307
2308 PaStream *stream = streamObject->stream;
2309 frames = Pa_GetStreamWriteAvailable(stream);
2310 return PyInt_FromLong(frames);
2311 }
ob_refcnt of new ref from call to Py_BuildValue is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1