1#ifndef CPYCPPYY_UTILITY_H
2#define CPYCPPYY_UTILITY_H
14#if PY_VERSION_HEX < 0x030b0000
27 int flags = METH_VARARGS);
45 const std::vector<std::string>& argtypes, std::ostringstream& code);
60std::string
MapOperatorName(
const std::string&
name,
bool bTakesParames,
bool* stubbed =
nullptr);
93 Py_XDECREF(
e.fType); Py_XDECREF(
e.fValue); Py_XDECREF(
e.fTrace);
94 e.fType =
e.fValue =
e.fTrace = 0;
101size_t FetchError(std::vector<PyError_t>&,
bool is_cpp =
false);
PyDictEntry *(* dict_lookup_func)(PyDictObject *, PyObject *, long)
unsigned long long PY_ULONG_LONG
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
PyCallable * FindBinaryOperator(PyObject *left, PyObject *right, const char *op, Cppyy::TCppScope_t scope=0)
void ConstructCallbackPreamble(const std::string &retType, const std::vector< std::string > &argtypes, std::ostringstream &code)
void ConstructCallbackReturn(const std::string &retType, int nArgs, std::ostringstream &code)
Py_ssize_t GetBuffer(PyObject *pyobject, char tc, int size, void *&buf, bool check=true)
std::string ConstructTemplateArgs(PyObject *pyname, PyObject *tpArgs, PyObject *args=nullptr, ArgPreference=kNone, int argoff=0, int *pcnt=nullptr)
PyObject * FuncPtr2StdFunction(const std::string &retType, const std::string &signature, void *address)
PyCallable * FindUnaryOperator(PyObject *pyclass, const char *op)
size_t FetchError(std::vector< PyError_t > &, bool is_cpp=false)
std::string MapOperatorName(const std::string &name, bool bTakesParames, bool *stubbed=nullptr)
void SetDetailedException(std::vector< PyError_t > &errors, PyObject *topmsg, PyObject *defexc)
bool InitProxy(PyObject *module, PyTypeObject *pytype, const char *name)
bool AddToClass(PyObject *pyclass, const char *label, PyCFunction cfunc, int flags=METH_VARARGS)
bool IsSTLIterator(const std::string &classname)
std::string ClassName(PyObject *pyobj)
PyObject * PyErr_Occurred_WithGIL()
unsigned long PyLongOrInt_AsULong(PyObject *pyobject)
dict_lookup_func gDictLookupOrg
PY_ULONG_LONG PyLongOrInt_AsULong64(PyObject *pyobject)
PyError_t(bool is_cpp=false)
static void Clear(PyError_t &e)