1218 static PyObject *
1219 pa_get_host_api_count(PyObject *self, PyObject *args)
1220 {
1221 PaHostApiIndex count;
1222
1223 if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
1224 return NULL;
1225
1226 count = Pa_GetHostApiCount();
1227
1228 if (count < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
1229
1230 #ifdef VERBOSE
1231 fprintf(stderr, "An error occured while using the portaudio stream\n");
1232 fprintf(stderr, "Error number: %d\n", count);
1233 fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(count));
1234 #endif
1235
1236 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
1237 Py_BuildValue("(s,i)",
1238 Pa_GetErrorText(count), count));
1239 return NULL;
1240 }
1241
1242 return PyInt_FromLong(count);
1243 }
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