12 PyObject* TTupleOfInstances_New(
13 Cppyy::TCppObject_t address, Cppyy::TCppType_t klass, Py_ssize_t nelems )
17 PyObject* tup = PyTuple_New( nelems );
18 for (
int i = 0; i < nelems; ++i ) {
21 PyTuple_SetItem( tup, i,
22 BindCppObject( (
char*)address + i*Cppyy::SizeOf( klass ), klass, kFALSE ) );
27 PyObject* args = PyTuple_New( 1 );
28 Py_INCREF( tup ); PyTuple_SET_ITEM( args, 0, tup );
29 PyObject* arr = PyTuple_Type.tp_new( &TTupleOfInstances_Type, args, NULL );
30 if ( PyErr_Occurred() ) PyErr_Print();
39 PyTypeObject TTupleOfInstances_Type = {
40 PyVarObject_HEAD_INIT( &PyType_Type, 0 )
41 (
char*)
"ROOT.InstancesArray",
59 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
61 (
char*)
"PyROOT long object for pass by reference",
86 #if PY_VERSION_HEX >= 0x02030000
89 #if PY_VERSION_HEX >= 0x02060000
92 #if PY_VERSION_HEX >= 0x03040000