I\'ve recently started using the Python/C API to build modules for Python using C code. I\'ve been trying to pass a Python list of numbers to a C function without success:>
Would this do to properly free memory?
PyObject *res; res = Py_BuildValue("i", _asdf(pr, pr_length)); free(pr); return res;