4 #ifndef PYROOT_UTILITY_H
5 #define PYROOT_UTILITY_H
28 int flags = METH_VARARGS );
36 const char* op,
const char* label,
const char* alt_label =
NULL );
38 const char* op,
const char* label,
const char* alt_label =
NULL );
40 const char* op,
const char* label,
const char* alt_label =
NULL );
57 const std::string
Compound(
const std::string& name );
67 const char* retType,
const std::vector<std::string>& signature,
const char* callback );
80 #endif // !PYROOT_UTILITY_H
Bool_t InitProxy(PyObject *module, PyTypeObject *pytype, const char *name)
Initialize a proxy class for use by python, and add it to the ROOT module.
Bool_t AddBinaryOperator(PyObject *left, PyObject *right, const char *op, const char *label, const char *alt_label=NULL)
Install the named operator (op) into the left object's class if such a function exists as a global ov...
PyDictEntry *(* dict_lookup_func)(PyDictObject *, PyObject *, Long_t)
PyObject * RemoveGUIEventInputHook()
R__EXTERN dict_lookup_func gDictLookupOrg
PyObject * BuildTemplateName(PyObject *pyname, PyObject *args, int argoff)
Helper to construct the "< type, type, ... >" part of a templated name (either for a class as in Make...
R__EXTERN Bool_t gDictLookupActive
std::string MapOperatorName(const std::string &name, Bool_t bTakesParames)
Map the given C++ operator name on the python equivalent.
const std::string ClassName(PyObject *pyobj)
Retrieve the class name from the given python object (which may be just an instance of the class)...
PyObject * PyErr_Occurred_WithGIL()
Re-acquire the GIL before calling PyErr_Occurred() in case it has been released; note that the p2...
ULong_t PyLongOrInt_AsULong(PyObject *pyobject)
void ErrMsgHandler(int level, Bool_t abort, const char *location, const char *msg)
Translate ROOT error/warning to python.
ULong64_t PyLongOrInt_AsULong64(PyObject *pyobject)
Convert
to C++ unsigned long long, with bounds checking.
PyObject * InstallGUIEventInputHook()
unsigned long long ULong64_t
double func(double *x, double *p)
Bool_t AddToClass(PyObject *pyclass, const char *label, PyCFunction cfunc, int flags=METH_VARARGS)
Add the given function to the class under name 'label'.
Bool_t AddUsingToClass(PyObject *pyclass, const char *method)
Helper to add base class methods to the derived class one (this covers the 'using' cases...
int GetBuffer(PyObject *pyobject, char tc, int size, void *&buf, Bool_t check=kTRUE)
Retrieve a linear buffer pointer from the given pyobject.
void * CreateWrapperMethod(PyObject *pyfunc, Long_t user, const char *retType, const std::vector< std::string > &signature, const char *callback)
Compile a function on the fly and return a function pointer for use on C-APIs.
Py_ssize_t ArraySize(const std::string &name)
Extract size from an array type, if available.
void ErrMsgCallback(char *msg)
Translate CINT error/warning into python equivalent.
const std::string Compound(const std::string &name)
Break down the compound of a fully qualified type name.