1272 static PyObject *
1273 pa_host_api_type_id_to_host_api_index(PyObject *self, PyObject *args)
1274 {
1275 PaHostApiTypeId typeid;
1276 PaHostApiIndex index;
1277
1278 if (!PyArg_ParseTuple(args, "i", &typeid))
when PyArg_ParseTuple() succeeds
taking False path
1279 return NULL;
1280
1281 index = Pa_HostApiTypeIdToHostApiIndex(typeid);
1282
1283 if (index < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
1284
1285 #ifdef VERBOSE
1286 fprintf(stderr, "An error occured while using the portaudio stream\n");
1287 fprintf(stderr, "Error number: %d\n", index);
1288 fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(index));
1289 #endif
1290
1291 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
1292 Py_BuildValue("(s,i)",
1293 Pa_GetErrorText(index), index));
1294 return NULL;
1295 }
1296
1297 return PyInt_FromLong(index);
1298 }
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