This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dexter
Recipients dexter
Date 2020-09-30.20:01:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
for example, there are some of shared libs, all these libs have a function named getList() exported. and getList() will return a list of names which also as a function name been exported.

shared lib A
export getList() -> return ["aaa", "bbb"]
export aaa()
export bbb();

shared lib A
export getList() -> return ["xyz", "abc", "mno"]
export xyz()
export abc();
export mno();

and I want expose shared lib A aaa, bbb or shared lib B xyz abc mno when I load them, (maybe A, maybe B, or maybe both if they exists, work like plugins)

I have a loop like

for (int i = 0; i < length_of_list; ++i) {
    char* funcName = getName(i);
    PyMethodDef def { funcName, fooCall, MATH_VARARGS, nullptr, /* funcname here */};
    /// ....

PyObject* fooCall(PyObject* self, PyObject* args, void* context) {
    char* funcname = (char*) context;
    /// .... load func based on name.
Date User Action Args
2020-09-30 20:01:45dextersetrecipients: + dexter
2020-09-30 20:01:45dextersetmessageid: <>
2020-09-30 20:01:45dexterlinkissue41895 messages
2020-09-30 20:01:44dextercreate