1416 static PyObject *
1417 pa_get_default_output_device(PyObject *self, PyObject *args)
1418 {
1419 PaDeviceIndex index;
1420
1421 if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
1422 return NULL;
1423
1424 index = Pa_GetDefaultOutputDevice();
1425 if (index == paNoDevice) {
when considering range: -0x80000000 <= value <= -2
taking False path
1426 PyErr_SetString(PyExc_IOError, "No Default Output Device Available");
1427 return NULL;
1428 } else if (index < 0) {
taking True path
1429
1430 #ifdef VERBOSE
1431 fprintf(stderr, "An error occured while using the portaudio stream\n");
1432 fprintf(stderr, "Error number: %d\n", index);
1433 fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(index));
1434 #endif
1435
1436 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
1437 Py_BuildValue("(s,i)",
1438 Pa_GetErrorText(index), index));
1439 return NULL;
1440 }
1441
1442 return PyInt_FromLong(index);
1443 }
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