- } else {
- /* OK, we have successfully created an instance of the Decoder object */
-
- /* Get the 'decode' function name as Python callable object. */
- py_func = PyObject_GetAttrString(py_instance, "decode"); /* NEWREF */
- if (!py_func || !PyCallable_Check(py_func)) {
- if (PyErr_Occurred())
- PyErr_Print(); /* Returns void. */
- fprintf(stderr, "Unable to find decode function in instance of Decoder class in PD module %s\n", name);
- Py_XDECREF(py_instance);
- Py_XDECREF(py_mod);
- return SRD_ERR_PYTHON; /* TODO: More specific error? */
- }
- }