2019 static PyObject *
2020 pa_is_stream_active(PyObject *self, PyObject *args)
2021 {
2022
2023 int err;
2024 PyObject *stream_arg;
2025 _pyAudio_Stream *streamObject;
2026
2027 if (!PyArg_ParseTuple(args, "O!", &_pyAudio_StreamType, &stream_arg))
when PyArg_ParseTuple() succeeds
taking False path
2028 return NULL;
2029
2030 streamObject = (_pyAudio_Stream *) stream_arg;
2031
2032 if (!_is_open(streamObject)) {
when considering range: -0x80000000 <= value <= -1
taking False path
2033 PyErr_SetString(PyExc_IOError, "Stream not open");
2034 return NULL;
2035 }
2036
2037 PaStream *stream = streamObject->stream;
2038
2039 if ((err = Pa_IsStreamActive(stream)) < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
2040 _cleanup_Stream_object(streamObject);
2041
2042 #ifdef VERBOSE
2043 fprintf(stderr, "An error occured while using the portaudio stream\n");
2044 fprintf(stderr, "Error number: %d\n", err);
2045 fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(err));
2046 #endif
2047
2048 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
2049 Py_BuildValue("(s,i)",
2050 Pa_GetErrorText(err),
2051 err));
2052 return NULL;
2053 }
2054
2055 if (err) {
2056 Py_INCREF(Py_True);
2057 return Py_True;
2058 }
2059
2060 Py_INCREF(Py_False);
2061 return Py_False;
2062 }
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
found 1 similar trace(s) to this