2313 static PyObject *
2314 pa_get_stream_read_available(PyObject *self, PyObject *args)
2315 {
2316 signed long frames;
2317 PyObject *stream_arg;
2318 _pyAudio_Stream *streamObject;
2319
2320 if (!PyArg_ParseTuple(args, "O!", &_pyAudio_StreamType, &stream_arg))
when PyArg_ParseTuple() succeeds
taking False path
2321 return NULL;
2322
2323 streamObject = (_pyAudio_Stream *) stream_arg;
2324
2325 if (!_is_open(streamObject)) {
when considering value == (int)0 from _portaudiomodule.c:2325
taking True path
2326 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
2327 Py_BuildValue("(s,i)",
2328 "Stream closed",
2329 paBadStreamPtr));
2330 return NULL;
2331 }
2332
2333 PaStream *stream = streamObject->stream;
2334 frames = Pa_GetStreamReadAvailable(stream);
2335 return PyInt_FromLong(frames);
2336 }
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