4 #ifndef PYROOT_PYROOTTYPE_H
5 #define PYROOT_PYROOTTYPE_H
10 #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION == 2
13 #include "structmember.h"
17 PyNumberMethods as_number;
18 PySequenceMethods as_sequence;
19 PyMappingMethods as_mapping;
20 PyBufferProcs as_buffer;
21 PyObject *name, *slots;
22 PyMemberDef members[1];
39 PyHeapTypeObject fType;
40 Cppyy::TCppType_t fCppType;
47 R__EXTERN PyTypeObject PyRootType_Type;
49 template<
typename T >
50 inline Bool_t PyRootType_Check( T*
object )
52 return object && PyObject_TypeCheck(
object, &PyRootType_Type );
55 template<
typename T >
56 inline Bool_t PyRootType_CheckExact( T*
object )
58 return object && Py_TYPE(
object) == &PyRootType_Type;
63 #endif // !PYROOT_PYROOTTYPE_H