hi @MRAB
i try again,it not ok. test files:
1.cpython.cpp ---c call python maintenance.py
2.maintenance.py python maintenance.py call pycapsule.cpp(dll)
the code file,see attachment.
At 2018-02-21 11:18:18, "MRAB" wrote:
>On 2018-02-21 02:28, 赵亚 wrote:
>
>This "
I have a demand:
c call python ,have a void* pointer pass to python and python call c,the void*
pointer need pass to c.
i don't know how to do,have any good idea ? thanks!___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/
i have question:call,c-->python-->c.
1.the c pointer void* abc="123" by pycapsule in the c code.
..
void* lpContext = "abc";
PyObject * lpPyContext = PyCapsule_New(lpContext, "Context",NULL);
..
PyTuple_SetItem(pArgs, 1, lpPyContext);
PyObject* pyResult = PyObject_CallObject(pFunc, pArgs);