Python extension using a C library with one 'hello' function

Veek M vek.m1234 at gmail.com
Tue Nov 4 11:09:58 EST 2014


static PyMethodDef hellomethods[] = {
    {"hello", py_hello, METH_VARARGS, py_hello_doc},
    {NULL, NULL, 0, NULL},
};

It's basically the METH_VARARGS field that's giving the problem. Switching 
it to NULL gives, 
SystemError: Bad call flags in PyCFunction_Call. METH_OLDARGS is no longer 
supported!

and METH_NOARGS doesn't work in 3.2



More information about the Python-list mailing list