1237 static PyObject *
1238 pa_get_host_api_count(PyObject *self, PyObject *args)
1239 {
1240 PaHostApiIndex count;
1241
1242 if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
1243 return NULL;
1244
1245 count = Pa_GetHostApiCount();
1246
1247 if (count < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
1248
1249 #ifdef VERBOSE
1250 fprintf(stderr, "An error occured while using the portaudio stream\n");
1251 fprintf(stderr, "Error number: %d\n", count);
1252 fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(count));
1253 #endif
1254
1255 PyErr_SetObject(PyExc_IOError,
when Py_BuildValue() succeeds
calling PyErr_SetObject()
new ref from call to Py_BuildValue was allocated at: PyErr_SetObject(PyExc_IOError,
ob_refcnt is now refs: 1 owned
ob_refcnt is now refs: 1 owned, 1 borrowed
1256 Py_BuildValue("(s,i)",
1257 Pa_GetErrorText(count), count));
1258 return NULL;
memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
was expecting final owned ob_refcnt of new ref from call to Py_BuildValue to be 0 since nothing references it but final ob_refcnt is refs: 1 owned, 1 borrowed
1259 }
1260
1261 return PyLong_FromLong(count);
1262 }