File: _portaudiomodule.c
Function: pa_host_api_device_index_to_device_index
Error: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
1300 static PyObject *
1301 pa_host_api_device_index_to_device_index(PyObject *self, PyObject *args)
1302 {
1303   PaHostApiIndex apiIndex;
1304   int hostApiDeviceindex;
1305   PaDeviceIndex devIndex;
1306 
1307 
1308   if (!PyArg_ParseTuple(args, "ii", &apiIndex, &hostApiDeviceindex))
when PyArg_ParseTuple() succeeds
taking False path
1309     return NULL;
1310 
1311   devIndex = Pa_HostApiDeviceIndexToDeviceIndex(apiIndex, hostApiDeviceindex);
1312   if (devIndex < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
1313 
1314 #ifdef VERBOSE
1315     fprintf(stderr, "An error occured while using the portaudio stream\n");
1316     fprintf(stderr, "Error number: %d\n", devIndex);
1317     fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(devIndex));
1318 #endif
1319 
1320     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
1321 		    Py_BuildValue("(s,i)",
1322 				  Pa_GetErrorText(devIndex), devIndex));
1323     return NULL;
1324   }
1325 
1326   return PyInt_FromLong(devIndex);
1327 }
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