[issue36562] Can't call a method from a module built in Python C API

Joao Paulo report at bugs.python.org
Mon Apr 8 16:00:48 EDT 2019


Joao Paulo <jjpp.of at gmail.com> added the comment:

The following modifications solved the problem:

static PyMethodDef pyModuleMethods[] = {
    { "runTester", (PyCFunction)runTesterFunc, METH_VARARGS | METH_KEYWORDS, "Foo Boo." },
    { NULL, NULL, 0, NULL }
};

static struct PyModuleDef MyModule = {
    PyModuleDef_HEAD_INIT,
    "my_module",
    "Foo Boo.",
    -1,
    pyModuleMethods,
    NULL
};

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36562>
_______________________________________


More information about the Python-bugs-list mailing list