42 PyObject *pydtype = PyTuple_GetItem(args, 0);
47 std::stringstream code;
48 code <<
"*((long*)" << &size <<
") = (long)sizeof(" << dtype <<
")";
68 PyObject *pyobj = PyTuple_GetItem(args, 0);
73 PyObject *pycppname = PyTuple_GetItem(args, 1);
77 PyObject *pymethodname = PyTuple_GetItem(args, 2);
81 unsigned long long pointer = 0;
82 std::stringstream code;
83 code <<
"*((long*)" << &pointer <<
") = reinterpret_cast<long>(reinterpret_cast<"
84 << cppname <<
"*>(" << cppobj <<
")->" << methodname <<
"())";
88 PyObject *pypointer = PyLong_FromUnsignedLongLong(pointer);
116 Py_XDECREF(derivedMethod);
121 if (!mro || !PyTuple_Check(mro)) {
123 Py_DECREF(derivedMethod);
128 for (
int i = 1; i < PyTuple_GET_SIZE(mro); ++i) {
129 baseMethod = (
CPPOverload *)PyObject_GetAttrString(PyTuple_GET_ITEM(mro, i),
const_cast<char *
>(method));
139 Py_DECREF(baseMethod);
140 baseMethod =
nullptr;
146 Py_XDECREF(baseMethod);
147 Py_DECREF(derivedMethod);
155 Py_DECREF(baseMethod);
156 Py_DECREF(derivedMethod);
174 PyObject *pyclass = PyTuple_GetItem(args, 0);
#define CPyCppyy_PyText_AsString
#define CPyCppyy_PyText_FromString
static bool AddUsingToClass(PyObject *pyclass, const char *method)
void AdoptMethod(PyCallable *pc)
MethodInfo_t * fMethodInfo
bool CPPOverload_Check(T *object)
PyObject * GetEndianess(PyObject *self, PyObject *args)
Get endianess of the system.
PyObject * GetDataPointer(PyObject *self, PyObject *args)
Get pointer to the data of an object.
PyObject * GetSizeOfType(PyObject *self, PyObject *args)
Set of helper functions that are invoked from the pythonizors, on the Python side.
PyObject * AddUsingToClass(PyObject *self, PyObject *args)
Add base class overloads of a given method to a derived class.
static Roo_reg_AGKInteg1D instance
static constexpr double pc
CPPOverload::Methods_t fMethods