14#define CustomInstanceMethod_GET_SELF(meth) reinterpret_cast<PyMethodObject *>(meth)->im_self
15#define CustomInstanceMethod_GET_FUNCTION(meth) reinterpret_cast<PyMethodObject *>(meth)->im_func
16#if PY_VERSION_HEX >= 0x03000000
18#define CustomInstanceMethod_GET_CLASS(meth) Py_None
20#define CustomInstanceMethod_GET_CLASS(meth) PyMethod_GET_CLASS(meth)
29 (
char*)
"cppyy.Double",
30 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
31 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
33 (
char*)
"CPyCppyy float object for pass by reference",
34 0, 0, 0, 0, 0, 0, 0, 0, 0,
36 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
37#if PY_VERSION_HEX >= 0x02030000
40#if PY_VERSION_HEX >= 0x02060000
43#if PY_VERSION_HEX >= 0x03040000
52 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
53 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
55#
if PY_VERSION_HEX >= 0x03040000
56 | Py_TPFLAGS_LONG_SUBCLASS
59 (
char*)
"CPyCppyy long object for pass by reference",
60 0, 0, 0, 0, 0, 0, 0, 0, 0,
62 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
63#if PY_VERSION_HEX >= 0x02030000
66#if PY_VERSION_HEX >= 0x02060000
69#if PY_VERSION_HEX >= 0x03040000
78 if (!PyArg_ParseTuple(args,
const_cast<char*
>(
"|L"), &addr))
85 (
char*)
"cppyy.TypedefPointerToClass",
87 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
91 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
92#
if PY_VERSION_HEX >= 0x02030000
95#
if PY_VERSION_HEX >= 0x02060000
98#
if PY_VERSION_HEX >= 0x03040000
106#ifndef PyMethod_MAXFREELIST
107#define PyMethod_MAXFREELIST 256
112#
if PY_VERSION_HEX < 0x03000000
120 if (!PyCallable_Check(func)) {
121 PyErr_Format(PyExc_SystemError,
122 "%s:%d: bad argument to internal function", __FILE__, __LINE__);
128 free_list = (PyMethodObject*)(im->im_self);
137 im->im_weakreflist =
nullptr;
142#if PY_VERSION_HEX < 0x03000000
144 im->im_class = pyclass;
146 PyObject_GC_Track(im);
155 PyObject_GC_UnTrack(im);
157 if (im->im_weakreflist !=
nullptr)
158 PyObject_ClearWeakRefs((
PyObject*)im);
160 Py_DECREF(im->im_func);
161 Py_XDECREF(im->im_self);
162#if PY_VERSION_HEX < 0x03000000
163 Py_XDECREF(im->im_class);
189 if (1 <= argc && PyObject_IsInstance(PyTuple_GET_ITEM(args, 0), pyclass) == 1) {
190 self = PyTuple_GET_ITEM(args, 0);
192 PyObject* newArgs = PyTuple_New(argc-1);
193 for (
int i = 1; i < argc; ++i) {
196 PyTuple_SET_ITEM(newArgs, i-1,
v);
202 return PyMethod_Type.tp_call(meth, args, kw);
213 func->m_self =
nullptr;
226#
if PY_VERSION_HEX < 0x03000000
244 (
char*)
"cppyy.InstanceMethod",
247 0, 0, 0, 0, 0, 0, 0, 0, 0,
250 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
252 (
char*)
"CPyCppyy custom instance method (internal)",
253 0, 0, 0, 0, 0, 0, 0, 0, 0,
257 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
258#
if PY_VERSION_HEX >= 0x02030000
261#
if PY_VERSION_HEX >= 0x02060000
264#
if PY_VERSION_HEX >= 0x03040000
295 (
char*)
"cppyy.indexiter",
299 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
307 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
308#
if PY_VERSION_HEX >= 0x02030000
311#
if PY_VERSION_HEX >= 0x02060000
314#
if PY_VERSION_HEX >= 0x03040000
354 (
char*)
"cppyy.vectoriter",
358 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
366 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
367#
if PY_VERSION_HEX >= 0x02030000
370#
if PY_VERSION_HEX >= 0x02060000
373#
if PY_VERSION_HEX >= 0x03040000
#define CPyCppyy_PyCFunction_Call
#define PyVarObject_HEAD_INIT(type, size)
#define PyMethod_MAXFREELIST
#define CustomInstanceMethod_GET_SELF(meth)
#define CustomInstanceMethod_GET_FUNCTION(meth)
#define CustomInstanceMethod_GET_CLASS(meth)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
virtual PyObject * FromMemory(void *address)
Set of helper functions that are invoked from the pythonizors, on the Python side.
static PyObject * indexiter_iternext(indexiterobject *ii)
PyObject * CustomInstanceMethod_New(PyObject *func, PyObject *self, PyObject *pyclass)
PyTypeObject VectorIter_Type
PyTypeObject CustomInstanceMethod_Type
static PyMethodObject * free_list
PyTypeObject RefFloat_Type
Custom "builtins," detectable by type, for pass by ref and improved performance.
PyTypeObject TypedefPointerToClass_Type
PyObject * BindCppObjectNoCast(Cppyy::TCppObject_t object, Cppyy::TCppType_t klass, const unsigned flags=0)
static void vectoriter_dealloc(vectoriterobject *vi)
static int indexiter_traverse(indexiterobject *ii, visitproc visit, void *arg)
static PyObject * im_descr_get(PyObject *meth, PyObject *obj, PyObject *pyclass)
static PyObject * vectoriter_iternext(vectoriterobject *vi)
bool CPPInstance_Check(T *object)
PyTypeObject IndexIter_Type
static void indexiter_dealloc(indexiterobject *ii)
static PyObject * tpc_call(typedefpointertoclassobject *self, PyObject *args, PyObject *)
static void im_dealloc(PyMethodObject *im)
static PyObject * im_call(PyObject *meth, PyObject *args, PyObject *kw)
PyObject_HEAD PyObject * ii_container
PyObject_HEAD Cppyy::TCppType_t fType
Cppyy::TCppType_t vi_klass
CPyCppyy::Converter * vi_converter