Logo ROOT   6.10/09
Reference Guide
Namespaces | Macros | Variables
ObjectProxy.cxx File Reference
#include "PyROOT.h"
#include "PyStrings.h"
#include "ObjectProxy.h"
#include "RootWrapper.h"
#include "Utility.h"
#include "TBufferFile.h"
#include "TClass.h"
#include "TObject.h"
#include "TROOT.h"
#include <algorithm>
Include dependency graph for ObjectProxy.cxx:

Namespaces

 PyROOT
 

Macros

#define PYROOT_STUB(name, op, pystring)
 

Variables

R__EXTERN PyObjectPyROOT::gRootModule = 0
 
PyTypeObject PyROOT::ObjectProxy_Type
 

Macro Definition Documentation

◆ PYROOT_STUB

#define PYROOT_STUB (   name,
  op,
  pystring 
)
Value:
PyObject* op_##name##_stub( PyObject* left, PyObject* right ) \
{ \
if ( ! ObjectProxy_Check( left ) ) { \
if ( ObjectProxy_Check( right ) ) { \
std::swap( left, right ); \
} else { \
Py_INCREF( Py_NotImplemented ); \
return Py_NotImplemented; \
} \
} \
/* place holder to lazily install __name__ if a global overload is available */ \
left, right, #op, "__"#name"__", "__r"#name"__" ) ) { \
Py_INCREF( Py_NotImplemented ); \
return Py_NotImplemented; \
} \
\
/* redo the call, which will now go to the newly installed method */ \
return PyObject_CallMethodObjArgs( left, pystring, right, NULL ); \
}
Bool_t AddBinaryOperator(PyObject *left, PyObject *right, const char *op, const char *label, const char *alt_label=NULL)
Install the named operator (op) into the left object&#39;s class if such a function exists as a global ov...
Definition: Utility.cxx:315
void swap(TDirectoryEntry &e1, TDirectoryEntry &e2) noexcept
#define NULL
Definition: RtypesCore.h:88
Bool_t ObjectProxy_Check(T *object)
Definition: ObjectProxy.h:91
_object PyObject
Definition: TPyArg.h:20

Definition at line 299 of file ObjectProxy.cxx.