i have a c++ class A , it will callback a python function foo(A) , and i want to send a A* pointer to this function , how can i do it ? my code is similar as follow :
PyObject* arg = (PyObject*)(pA);
PyTuple_SetItem(args, 0, arg);
PyObject* pRet = PyObject_CallObject(foo, args);
but it always crash , seems wrap arg from A* is not correct , can anybody help me ?