4#include "structmember.h"     
    5#if PY_VERSION_HEX >= 0x02050000 
    6#if PY_VERSION_HEX <  0x030b0000 
   14#define CO_NOFREE       0x0040 
   36#ifndef CPPOverload_MAXFREELIST 
   37#define CPPOverload_MAXFREELIST 32 
   43class TPythonCallback : 
public PyCallable {
 
   62    PyObject* GetSignature(
bool  = 
true)
 override {
 
   65    PyObject* GetPrototype(
bool  = 
true)
 override {
 
   72            return GetPrototype();
 
   76    int GetPriority()
 override { 
return 100; };
 
   77    bool IsGreedy()
 override { 
return false; };
 
   79    int GetMaxArgs()
 override { 
return 100; };
 
   83    PyObject* GetArgDefault(
int , 
bool  =
true)
 override {
 
   95    PyCallable* Clone()
 override { 
return new TPythonCallback(*
this); }
 
  100#if PY_VERSION_HEX >= 0x03080000 
  157static int PriorityCmp(
const std::pair<int, PyCallable*>& left, 
const std::pair<int, PyCallable*>& right)
 
  159    return left.first > right.first;
 
  173static inline PyObject* HandleReturn(
 
  251    if (
pymeth->fMethodInfo->fDoc) {
 
  253        return pymeth->fMethodInfo->fDoc;
 
  271    for (CPPOverload::Methods_t::size_type i = 1; i < 
nMethods; ++i) {
 
  284    pymeth->fMethodInfo->fDoc = val;
 
  295    *
pymeth->fMethodInfo->fRefCount += 1;
 
  312            "function %s has no attribute \'im_self\'", 
pymeth->fMethodInfo->fName.c_str());
 
  314    } 
else if (
pymeth->fSelf != 0) {
 
  331                "function %s has no attribute \'im_class\'", 
pymeth->fMethodInfo->fName.c_str());
 
  346#if PY_VERSION_HEX < 0x03000000 
  347#define CPyCppyy_Py3_UNUSED(name) name 
  349#define CPyCppyy_Py3_UNUSED(name) 
  356#if PY_VERSION_HEX < 0x03000000 
  518        pymeth->fMethodInfo->fFlags &= ~CallContext::kUseStrict;
 
  521        pymeth->fMethodInfo->fFlags &= ~CallContext::kUseHeuristics;
 
  524            "expected kMemoryStrict or kMemoryHeuristics as value for __mempolicy__");
 
  533#define CPPYY_BOOLEAN_PROPERTY(name, flag, label)                            \ 
  534static PyObject* mp_get##name(CPPOverload* pymeth, void*) {                  \ 
  535    if (pymeth->fMethodInfo->fFlags & flag) {                                \ 
  541static int mp_set##name(CPPOverload* pymeth, PyObject* value, void*) {       \ 
  542    return set_flag(pymeth, value, flag, label);                             \ 
 
  560        return methods[0]->GetTypeName();
 
  568    {(
char*)
"__name__",   (
getter)
mp_name,   
nullptr, 
nullptr, 
nullptr},
 
  584    {(
char*)
"func_name",     (
getter)
mp_name,          
nullptr, 
nullptr, 
nullptr},
 
  589      (
char*)
"For ownership rules of result: if true, objects are python-owned", 
nullptr},
 
  591      (
char*)
"For argument ownership rules: like global, either heuristic or strict", 
nullptr},
 
  593      (
char*)
"If true, set a lifeline from the return value onto self", 
nullptr},
 
  595      (
char*)
"If true, releases GIL on call into C++", 
nullptr},
 
  597      (
char*)
"not implemented", 
nullptr},
 
  599      (
char*)
"If true, turn signals into Python exceptions", 
nullptr},
 
  604    {(
char*)
nullptr, 
nullptr, 
nullptr, 
nullptr, 
nullptr}
 
  608#if PY_VERSION_HEX >= 0x03080000 
  615#if PY_VERSION_HEX < 0x03080000 
  672        ctxt.fFlags &= ~CallContext::kAllowImplicit;
 
  682        std::vector<std::pair<int, PyCallable*>> 
pm; 
pm.reserve(
methods.size());
 
  684            pm.emplace_back(ptr->GetPriority(), ptr);
 
  686        for (CPPOverload::Methods_t::size_type i = 0; i < 
methods.size(); ++i)
 
  691    std::vector<Utility::PyError_t> 
errors;
 
  693    for (
int stage = 0; stage < 2; ++stage) {
 
  695        for (CPPOverload::Methods_t::size_type i = 0; i < 
nMethods; ++i) {
 
  742                ctxt.fFlags &= ~CallContext::kHaveImplicit;
 
  757        "none of the %d overloaded methods succeeded. Full details:", (
int)
nMethods);
 
  768     std::ostringstream s;
 
  769     s << 
"<C++ overload \"" << 
cppinst->fMethodInfo->fName << 
"\" at " << (
void*)
cppinst << 
">";
 
  787#if PY_VERSION_HEX < 0x03080000 
  811    *
pymeth->fMethodInfo->fRefCount += 1;
 
  814#if PY_VERSION_HEX >= 0x03080000 
  855    pymeth->fMethodInfo = 
new CPPOverload::MethodInfo_t;
 
  869    if (--(*
pymeth->fMethodInfo->fRefCount) <= 0) {
 
  870        delete pymeth->fMethodInfo;
 
  930    const char* 
sigarg = 
nullptr;
 
  951    TPythonCallback* cb = 
new TPythonCallback(
new_overload);
 
  964    return pymeth->fMethodInfo->fMethods[0]->Reflex(request, 
format);
 
  970      (
char*)
"select overload for dispatch" },
 
  972      (
char*)
"add a new overload" },
 
  974      (
char*)
"C++ overload reflection information" },
 
  975    {(
char*)
nullptr, 
nullptr, 0, 
nullptr }
 
  984    (
char*)
"cppyy.CPPOverload",        
 
 1011#if PY_VERSION_HEX >= 0x03080000 
 1015    (
char*)
"cppyy method proxy (internal)", 
 
 1040#if PY_VERSION_HEX >= 0x02030000 
 1043#if PY_VERSION_HEX >= 0x02060000 
 1046#if PY_VERSION_HEX >= 0x03040000 
 1049#if PY_VERSION_HEX >= 0x03080000 
 1052#if PY_VERSION_HEX >= 0x030c0000 
 1055#if PY_VERSION_HEX >= 0x030d0000 
 
 1072    if (
name == 
"__init__")
 
 1089#if PY_VERSION_HEX >= 0x03080000 
 
 1098    fMethodInfo->fMethods.push_back(pc);
 
 
 1106        fMethodInfo->fFlags = 
meth->fMethodInfo->fFlags;
 
 1107    fMethodInfo->fMethods.insert(fMethodInfo->fMethods.end(),
 
 1110    meth->fMethodInfo->fDispatchMap.clear();
 
 1111    meth->fMethodInfo->fMethods.clear();
 
 
 1120    std::string 
sig1{
"("};
 
 1146            bool isconst = 
meth->IsConst();
 
 1161                newmeth->fMethodInfo->fFlags = fMethodInfo->fFlags;
 
 
 1189            bool isconst = 
meth->IsConst();
 
 1208        for (
int i = 0; i < 
n; i++) {
 
 1232    newmeth->fMethodInfo->fFlags = fMethodInfo->fFlags;
 
 
 1241    for (Methods_t::iterator it = fMethods.begin(); it != fMethods.end(); ++it) {
 
 
#define CPyCppyy_Py3_UNUSED(name)
#define CPPOverload_MAXFREELIST
#define CPPYY_BOOLEAN_PROPERTY(name, flag, label)
#define CPyCppyy_PyText_Append
#define CPyCppyy_PyText_AsString
PyObject * CPyCppyy_PyArgs_t
#define CPyCppyy_PyText_AppendAndDel
PyObject * CPyCppyy_PyObject_Call(PyObject *cb, PyObject *args, size_t, PyObject *kwds)
#define CPyCppyy_PyText_FromFormat
#define CPyCppyy_PyText_FromString
#define CPyCppyy_PyText_Check
#define PyVarObject_HEAD_INIT(type, size)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
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 Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
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
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
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 Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
void MergeOverload(CPPOverload *meth)
void AdoptMethod(PyCallable *pc)
MethodInfo_t * fMethodInfo
PyObject * FindOverload(const std::string &signature, int want_const=-1)
std::vector< PyCallable * > Methods_t
void Set(const std::string &name, std::vector< PyCallable * > &methods)
const_iterator begin() const
const_iterator end() const
void SetDetailedException(std::vector< PyError_t > &&errors, PyObject *topmsg, PyObject *defexc)
size_t FetchError(std::vector< PyError_t > &, bool is_cpp=false)
bool HaveImplicit(CallContext *ctxt)
PyObject * GetScopeProxy(Cppyy::TCppScope_t)
static PyMethodObject * free_list
bool NoImplicit(CallContext *ctxt)
bool IsCreator(uint64_t flags)
uint64_t HashSignature(CPyCppyy_PyArgs_t args, size_t nargsf)
bool CPPInstance_Check(T *object)
PyTypeObject CPPOverload_Type
bool IsConstructor(uint64_t flags)
bool IsSorted(uint64_t flags)
RPY_EXPORTED size_t SizeOf(TCppType_t klass)
RPY_EXPORTED TCppFuncAddr_t GetFunctionAddress(TCppMethod_t method, bool check_enabled=true)
CPPOverload::Methods_t fMethods
static ECallFlags sMemoryPolicy