30 PyGILState_STATE m_GILState;
32 PyGILRAII() : m_GILState(PyGILState_Ensure()) { }
33 ~PyGILRAII() { PyGILState_Release(m_GILState); }
42 int nArgs = args.size();
43 PyObject *pyargs = PyTuple_New(nArgs);
44 for (
int i = 0; i < nArgs; ++i)
45 PyTuple_SetItem(pyargs, i, (
PyObject *)args[i]);
46 pyself = PyObject_Call(pyclass, pyargs, NULL);
56 pyself = PyObject_Call(pyclass, pyargs, NULL);
65 int nArgs = args.size();
66 PyObject *pyargs = PyTuple_New(nArgs);
67 for (
int i = 0; i < nArgs; ++i)
68 PyTuple_SetItem(pyargs, i, (
PyObject *)args[i]);
69 PyObject *result = PyObject_Call(pymeth, pyargs, NULL);
int Int_t
Signed integer 4 bytes (int).
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
double Double_t
Double 8 bytes.
void CallConstructor(PyObject *&pyself, PyObject *pyclass)
static PyObject * CallMethod(PyObject *pymeth, const std::vector< TPyArg > &args)
PyObject * fPyObject
! converted C++ value as python object
static void CallDestructor(PyObject *&pyself, PyObject *pymeth, const std::vector< TPyArg > &args)
TPyArg & operator=(const TPyArg &)
Assignment operator.
virtual ~TPyArg()
Done with held PyObject.
static void CallConstructor(PyObject *&pyself, PyObject *pyclass, const std::vector< TPyArg > &args)