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 {
49 if (!PyCallable_Check(callable)) {
50 PyErr_SetString(PyExc_TypeError,
"parameter must be callable");
57 virtual ~TPythonCallback() {
62 virtual PyObject* GetSignature(
bool =
true) {
65 virtual PyObject* GetPrototype(
bool =
true) {
69 if (PyObject_HasAttrString(fCallable,
"__doc__")) {
70 return PyObject_GetAttrString(fCallable,
"__doc__");
72 return GetPrototype();
76 virtual int GetPriority() {
return 100; };
77 virtual bool IsGreedy() {
return false; };
79 virtual int GetMaxArgs() {
return 100; };
83 virtual PyObject* GetArgDefault(
int ,
bool =
true) {
95 virtual PyCallable* Clone() {
return new TPythonCallback(*
this); }
97 virtual PyObject* Call(CPPInstance*& self,
100#if PY_VERSION_HEX >= 0x03080000
102 if (nargsf & PY_VECTORCALL_ARGUMENTS_OFFSET) {
104 nargsf &= ~PY_VECTORCALL_ARGUMENTS_OFFSET;
107 Py_ssize_t nkwargs = kwds ? PyTuple_GET_SIZE(kwds) : 0;
108 Py_ssize_t totalargs = PyVectorcall_NARGS(nargsf)+nkwargs;
115 memcpy((
void*)&newArgs[1], args, totalargs *
sizeof(
PyObject*));
123 if (nargsf & PY_VECTORCALL_ARGUMENTS_OFFSET)
125 else PyMem_Free((
void*)args);
131 newArgs = PyTuple_New(nargs+1);
133 PyTuple_SET_ITEM(newArgs, 0, (
PyObject*)self);
134 for (
Py_ssize_t iarg = 0; iarg < nargs; ++iarg) {
135 PyObject* pyarg = PyTuple_GET_ITEM(args, iarg);
137 PyTuple_SET_ITEM(newArgs, iarg+1, pyarg);
151static inline bool IsPseudoFunc(CPPOverload* pymeth)
157static int PriorityCmp(
const std::pair<int, PyCallable*>& left,
const std::pair<int, PyCallable*>& right)
159 return left.first > right.first;
163static inline void ResetCallState(CPPInstance* descr_self, CPPInstance*& im_self)
166 if (descr_self != im_self) {
168 im_self = descr_self;
173static inline PyObject* HandleReturn(
181 if (
IsCreator(pymeth->fMethodInfo->fFlags)) {
186 im_self->PythonOwns();
191 cppres->PythonOwns();
209 ptrdiff_t
offset = (ptrdiff_t)cppres->GetObject() - (ptrdiff_t)im_self->GetObject();
229 ResetCallState(pymeth->fSelf, im_self);
236static PyObject* mp_name(CPPOverload* pymeth,
void*)
242static PyObject* mp_module(CPPOverload* ,
void*)
249static PyObject* mp_doc(CPPOverload* pymeth,
void*)
251 if (pymeth->fMethodInfo->fDoc) {
252 Py_INCREF(pymeth->fMethodInfo->fDoc);
253 return pymeth->fMethodInfo->fDoc;
260 CPPOverload::Methods_t::size_type nMethods = methods.size();
263 PyObject* doc = methods[0]->GetDocString();
271 for (CPPOverload::Methods_t::size_type i = 1; i < nMethods; ++i) {
275 Py_DECREF(separator);
280static int mp_doc_set(CPPOverload* pymeth,
PyObject *val,
void *)
282 Py_XDECREF(pymeth->fMethodInfo->fDoc);
284 pymeth->fMethodInfo->fDoc = val;
289static PyObject* mp_meth_func(CPPOverload* pymeth,
void*)
295 *pymeth->fMethodInfo->fRefCount += 1;
296 newPyMeth->fMethodInfo = pymeth->fMethodInfo;
306static PyObject* mp_meth_self(CPPOverload* pymeth,
void*)
310 if (IsPseudoFunc(pymeth)) {
311 PyErr_Format(PyExc_AttributeError,
312 "function %s has no attribute \'im_self\'", pymeth->fMethodInfo->fName.c_str());
314 }
else if (pymeth->fSelf != 0) {
315 Py_INCREF((
PyObject*)pymeth->fSelf);
323static PyObject* mp_meth_class(CPPOverload* pymeth,
void*)
327 if (!IsPseudoFunc(pymeth) && pymeth->fMethodInfo->fMethods.size()) {
328 PyObject* pyclass = pymeth->fMethodInfo->fMethods[0]->GetScopeProxy();
330 PyErr_Format(PyExc_AttributeError,
331 "function %s has no attribute \'im_class\'", pymeth->fMethodInfo->fName.c_str());
339static PyObject* mp_func_closure(CPPOverload* ,
void*)
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
361 PyObject* co_varnames = methods.size() == 1 ? methods[0]->GetCoVarNames() :
nullptr;
364 co_varnames = PyTuple_New(1 + 1 );
369 int co_argcount = (
int)PyTuple_Size(co_varnames);
372 PyObject* co_code = PyString_FromStringAndSize(
"d\x00\x00S", 4);
375 PyObject* co_consts = PyTuple_New(0);
376 PyObject* co_names = PyTuple_New(0);
379 PyObject* co_unused = PyTuple_New(0);
382 PyObject* co_filename = PyString_FromString(
"cppyy.py");
385 PyObject* co_name = PyString_FromString(pymeth->GetName().c_str());
390 PyObject* co_lnotab = PyString_FromString(
"\x00\x01\x0c\x01");
408 Py_DECREF(co_lnotab);
410 Py_DECREF(co_unused);
411 Py_DECREF(co_filename);
412 Py_DECREF(co_varnames);
414 Py_DECREF(co_consts);
425static PyObject* mp_func_defaults(CPPOverload* pymeth,
void*)
431 if (methods.size() != 1)
432 return PyTuple_New(0);
434 int maxarg = methods[0]->GetMaxArgs();
436 PyObject* defaults = PyTuple_New(maxarg);
439 for (
int iarg = 0; iarg < maxarg; ++iarg) {
440 PyObject* defvalue = methods[0]->GetArgDefault(iarg);
442 PyTuple_SET_ITEM(defaults, itup++, defvalue);
446 _PyTuple_Resize(&defaults, itup);
452static PyObject* mp_func_globals(CPPOverload* ,
void*)
456 PyObject* pyglobal = PyModule_GetDict(PyImport_AddModule((
char*)
"cppyy"));
457 Py_XINCREF(pyglobal);
466 pymeth->fMethodInfo->fFlags &= ~flag;
470 long istrue = PyLong_AsLong(
value);
471 if (istrue == -1 && PyErr_Occurred()) {
472 PyErr_Format(PyExc_ValueError,
"a boolean 1 or 0 is required for %s",
name);
477 pymeth->fMethodInfo->fFlags |= flag;
479 pymeth->fMethodInfo->fFlags &= ~flag;
485static PyObject* mp_getcreates(CPPOverload* pymeth,
void*)
488 return PyInt_FromLong((
long)
IsCreator(pymeth->fMethodInfo->fFlags));
492static int mp_setcreates(CPPOverload* pymeth,
PyObject*
value,
void*)
499static PyObject* mp_getmempolicy(CPPOverload* pymeth,
void*)
508 return PyInt_FromLong(-1);
512static int mp_setmempolicy(CPPOverload* pymeth,
PyObject*
value,
void*)
515 long mempolicy = PyLong_AsLong(
value);
518 pymeth->fMethodInfo->fFlags &= ~CallContext::kUseStrict;
521 pymeth->fMethodInfo->fFlags &= ~CallContext::kUseHeuristics;
523 PyErr_SetString(PyExc_ValueError,
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); \
550static
PyObject* mp_getcppname(CPPOverload* pymeth,
void*)
555 auto& methods = pymeth->fMethodInfo->fMethods;
559 if (methods.size() == 1)
560 return methods[0]->GetTypeName();
567static PyGetSetDef mp_getset[] = {
568 {(
char*)
"__name__", (getter)mp_name,
nullptr,
nullptr,
nullptr},
569 {(
char*)
"__module__", (getter)mp_module,
nullptr,
nullptr,
nullptr},
570 {(
char*)
"__doc__", (getter)mp_doc, (setter)mp_doc_set,
nullptr,
nullptr},
575 {(
char*)
"im_func", (getter)mp_meth_func,
nullptr,
nullptr,
nullptr},
576 {(
char*)
"im_self", (getter)mp_meth_self,
nullptr,
nullptr,
nullptr},
577 {(
char*)
"im_class", (getter)mp_meth_class,
nullptr,
nullptr,
nullptr},
579 {(
char*)
"func_closure", (getter)mp_func_closure,
nullptr,
nullptr,
nullptr},
580 {(
char*)
"func_code", (getter)mp_func_code,
nullptr,
nullptr,
nullptr},
581 {(
char*)
"func_defaults", (getter)mp_func_defaults,
nullptr,
nullptr,
nullptr},
582 {(
char*)
"func_globals", (getter)mp_func_globals,
nullptr,
nullptr,
nullptr},
583 {(
char*)
"func_doc", (getter)mp_doc, (setter)mp_doc_set,
nullptr,
nullptr},
584 {(
char*)
"func_name", (getter)mp_name,
nullptr,
nullptr,
nullptr},
588 {(
char*)
"__creates__", (getter)mp_getcreates, (setter)mp_setcreates,
589 (
char*)
"For ownership rules of result: if true, objects are python-owned",
nullptr},
590 {(
char*)
"__mempolicy__", (getter)mp_getmempolicy, (setter)mp_setmempolicy,
591 (
char*)
"For argument ownership rules: like global, either heuristic or strict",
nullptr},
592 {(
char*)
"__set_lifeline__", (getter)mp_getlifeline, (setter)mp_setlifeline,
593 (
char*)
"If true, set a lifeline from the return value onto self",
nullptr},
594 {(
char*)
"__release_gil__", (getter)mp_getthreaded, (setter)mp_setthreaded,
595 (
char*)
"If true, releases GIL on call into C++",
nullptr},
596 {(
char*)
"__useffi__", (getter)mp_getuseffi, (setter)mp_setuseffi,
597 (
char*)
"not implemented",
nullptr},
598 {(
char*)
"__sig2exc__", (getter)mp_getsig2exc, (setter)mp_setsig2exc,
599 (
char*)
"If true, turn signals into Python exceptions",
nullptr},
602 {(
char*)
"__cpp_name__", (getter)mp_getcppname,
nullptr,
nullptr,
nullptr},
604 {(
char*)
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
608#if PY_VERSION_HEX >= 0x03080000
615#if PY_VERSION_HEX < 0x03080000
616 size_t nargsf = PyTuple_GET_SIZE(args);
624 CPPInstance* im_self = pymeth->fSelf;
627 auto& methods = pymeth->fMethodInfo->fMethods;
629 CPPOverload::Methods_t::size_type nMethods = methods.size();
632 const auto mflags = pymeth->fMethodInfo->fFlags;
639 ctxt.fPyContext = (
PyObject*)im_self;
647 PyObject*
result = methods[0]->Call(im_self, args, nargsf, kwds, &ctxt);
648 return HandleReturn(pymeth, im_self,
result);
655 auto& dispatchMap = pymeth->fMethodInfo->fDispatchMap;
656 PyCallable* memoized_pc =
nullptr;
657 for (
const auto&
p : dispatchMap) {
658 if (
p.first == sighash) {
659 memoized_pc =
p.second;
667 PyObject*
result = memoized_pc->Call(im_self, args, nargsf, kwds, &ctxt);
669 return HandleReturn(pymeth, im_self,
result);
672 ctxt.fFlags &= ~CallContext::kAllowImplicit;
674 ResetCallState(pymeth->fSelf, im_self);
682 std::vector<std::pair<int, PyCallable*>> pm; pm.reserve(methods.size());
683 for (
auto ptr : methods)
684 pm.emplace_back(ptr->GetPriority(), ptr);
685 std::stable_sort(pm.begin(), pm.end(), PriorityCmp);
686 for (CPPOverload::Methods_t::size_type i = 0; i < methods.size(); ++i)
687 methods[i] = pm[i].second;
691 std::vector<Utility::PyError_t> errors;
692 std::vector<bool> implicit_possible(methods.size());
693 for (
int stage = 0; stage < 2; ++stage) {
694 bool bHaveImplicit =
false;
695 for (CPPOverload::Methods_t::size_type i = 0; i < nMethods; ++i) {
696 if (stage && !implicit_possible[i])
699 PyObject*
result = methods[i]->Call(im_self, args, nargsf, kwds, &ctxt);
703 dispatchMap.push_back(std::make_pair(sighash, methods[i]));
707 for (
auto&
p : dispatchMap) {
708 if (
p.first == sighash) {
709 p.second = methods[i];
718 return HandleReturn(pymeth, im_self,
result);
724 ResetCallState(pymeth->fSelf, im_self);
729 if (!PyErr_Occurred()) {
731 PyObject* sig = methods[i]->GetPrototype();
732 PyErr_Format(PyExc_SystemError,
"%s =>\n %s",
743 bHaveImplicit =
true;
744 implicit_possible[i] =
true;
745 ctxt.fFlags &= ~CallContext::kHaveImplicit;
747 implicit_possible[i] =
false;
748 ResetCallState(pymeth->fSelf, im_self);
760 "none of the %d overloaded methods succeeded. Full details:", (
int)nMethods);
768static PyObject* mp_str(CPPOverload* cppinst)
771 std::ostringstream s;
772 s <<
"<C++ overload \"" << cppinst->fMethodInfo->fName <<
"\" at " << (
void*)cppinst <<
">";
777static CPPOverload* mp_descr_get(CPPOverload* pymeth, CPPInstance* pyobj,
PyObject*)
790#if PY_VERSION_HEX < 0x03080000
791 if (!pyobj || (
PyObject*)pyobj == Py_None ) {
792 Py_XDECREF(pymeth->fSelf); pymeth->fSelf =
nullptr;
800 bool gc_track =
false;
802 if (newPyMeth != NULL) {
803 free_list = (CPPOverload*)(newPyMeth->fSelf);
814 *pymeth->fMethodInfo->fRefCount += 1;
815 newPyMeth->fMethodInfo = pymeth->fMethodInfo;
817#if PY_VERSION_HEX >= 0x03080000
818 newPyMeth->fVectorCall = pymeth->fVectorCall;
820 if (pyobj && (
PyObject*)pyobj != Py_None) {
822 newPyMeth->fSelf = pyobj;
825 newPyMeth->fSelf =
nullptr;
836 newPyMeth->fSelf = pyobj;
845 PyObject_GC_Track(newPyMeth);
856 pymeth->fSelf =
nullptr;
858 pymeth->fMethodInfo =
new CPPOverload::MethodInfo_t;
860 PyObject_GC_Track(pymeth);
865static void mp_dealloc(CPPOverload* pymeth)
868 PyObject_GC_UnTrack(pymeth);
870 Py_CLEAR(pymeth->fSelf);
872 if (--(*pymeth->fMethodInfo->fRefCount) <= 0) {
873 delete pymeth->fMethodInfo;
881 PyObject_GC_Del(pymeth);
890 return _Py_HashPointer(pymeth->fMethodInfo);
894static int mp_traverse(CPPOverload* pymeth, visitproc visit,
void* args)
898 return visit((
PyObject*)pymeth->fSelf, args);
904static int mp_clear(CPPOverload* pymeth)
907 Py_CLEAR(pymeth->fSelf);
913static PyObject* mp_richcompare(CPPOverload* self, CPPOverload* other,
int op)
921 if ((
Py_TYPE(self) ==
Py_TYPE(other) && self->fMethodInfo == other->fMethodInfo) && \
922 ((IsPseudoFunc(self) && IsPseudoFunc(other)) || self->fSelf == other->fSelf)) {
933 const char* sigarg =
nullptr;
936 Py_ssize_t args_size = PyTuple_GET_SIZE(args);
938 PyArg_ParseTuple(args,
const_cast<char*
>(
"s|i:__overload__"), &sigarg, &want_const)) {
939 want_const = args_size == 1 ? -1 : want_const;
940 return pymeth->FindOverload(sigarg ? sigarg :
"", want_const);
941 }
else if (args_size &&
942 PyArg_ParseTuple(args,
const_cast<char*
>(
"O|i:__overload__"), &sigarg_tuple, &want_const)) {
944 want_const = args_size == 1 ? -1 : want_const;
945 return pymeth->FindOverload(sigarg_tuple, want_const);
947 PyErr_Format(PyExc_TypeError,
"Unexpected arguments to __overload__");
952static PyObject* mp_add_overload(CPPOverload* pymeth,
PyObject* new_overload)
954 TPythonCallback* cb =
new TPythonCallback(new_overload);
955 pymeth->AdoptMethod(cb);
964 if (!PyArg_ParseTuple(args,
const_cast<char*
>(
"i|i:__cpp_reflex__"), &request, &
format))
967 return pymeth->fMethodInfo->fMethods[0]->Reflex(request,
format);
971static PyMethodDef mp_methods[] = {
972 {(
char*)
"__overload__", (PyCFunction)mp_overload, METH_VARARGS,
973 (
char*)
"select overload for dispatch" },
974 {(
char*)
"__add_overload__", (PyCFunction)mp_add_overload, METH_O,
975 (
char*)
"add a new overload" },
976 {(
char*)
"__cpp_reflex__", (PyCFunction)mp_reflex, METH_VARARGS,
977 (
char*)
"C++ overload reflection information" },
978 {(
char*)
nullptr,
nullptr, 0,
nullptr }
987 (
char*)
"cppyy.CPPOverload",
990 (destructor)mp_dealloc,
991#
if PY_VERSION_HEX >= 0x03080000
1004#
if PY_VERSION_HEX >= 0x03080000
1005 (ternaryfunc)PyVectorcall_Call,
1007 (ternaryfunc)mp_call,
1013 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC
1014#if PY_VERSION_HEX >= 0x03080000
1015 | Py_TPFLAGS_HAVE_VECTORCALL | Py_TPFLAGS_METHOD_DESCRIPTOR
1018 (
char*)
"cppyy method proxy (internal)",
1019 (traverseproc)mp_traverse,
1021 (richcmpfunc)mp_richcompare,
1030 (descrgetfunc)mp_descr_get,
1043#if PY_VERSION_HEX >= 0x02030000
1046#if PY_VERSION_HEX >= 0x02060000
1049#if PY_VERSION_HEX >= 0x03040000
1052#if PY_VERSION_HEX >= 0x03080000
1055#if PY_VERSION_HEX >= 0x030c0000
1058#if PY_VERSION_HEX >= 0x030d0000
1075 if (
name ==
"__init__")
1080 name.find(
"Clone") != std::string::npos)
1083#if PY_VERSION_HEX >= 0x03080000
1084 fVectorCall = (vectorcallfunc)mp_vectorcall;
1092 fMethodInfo->fMethods.push_back(pc);
1101 fMethodInfo->fMethods.insert(fMethodInfo->fMethods.end(),
1111 bool accept_any = signature ==
":any:";
1114 std::string sig1{
"("};
1116 sig1.append(signature); sig1.append(
")");
1117 sig1.erase(std::remove(sig1.begin(), sig1.end(),
' '), std::end(sig1));
1121 for (
auto& meth : methods) {
1122 bool found = accept_any;
1124 PyObject* pysig2 = meth->GetSignature(
false);
1126 sig2.erase(std::remove(sig2.begin(), sig2.end(),
' '), std::end(sig2));
1128 if (sig1 == sig2) found =
true;
1131 pysig2 = meth->GetSignature(
true);
1133 sig3.erase(std::remove(sig3.begin(), sig3.end(),
' '), std::end(sig3));
1135 if (sig1 == sig3) found =
true;
1139 if (found && 0 <= want_const) {
1140 bool isconst = meth->IsConst();
1141 if (!((want_const && isconst) || (!want_const && !isconst)))
1147 newmeth = mp_new(
nullptr,
nullptr,
nullptr);
1149 newmeth->
Set(fMethodInfo->fName,
vec);
1153 newmeth->
fSelf = fSelf;
1165 PyErr_Format(PyExc_LookupError,
"signature \"%s\" not found", signature.c_str());
1179 size_t best_method = 0, method_index = 0;
1181 for (
auto& meth : methods) {
1182 if (0 <= want_const) {
1183 bool isconst = meth->IsConst();
1184 if (!((want_const && isconst) || (!want_const && !isconst)))
1188 int score = meth->GetArgMatchScore(args_tuple);
1190 if (score < min_score) {
1193 best_method = method_index;
1200 std::string sigargs(
"(");
1202 for (
int i = 0; i <
n; i++) {
1203 PyObject *pItem = PyTuple_GetItem(args_tuple, i);
1205 PyErr_Format(PyExc_LookupError,
"argument types should be in string format");
1209 sigargs += arg_type +
", ";
1213 PyErr_Format(PyExc_LookupError,
"signature with arguments \"%s\" not found", sigargs.c_str());
1217 CPPOverload* newmeth = mp_new(
nullptr,
nullptr,
nullptr);
1219 vec.push_back(methods[best_method]->Clone());
1220 newmeth->
Set(fMethodInfo->fName,
vec);
1224 newmeth->
fSelf = fSelf;
1235 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)
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)
PyObject_HEAD CPPInstance * fSelf
std::vector< PyCallable * > Methods_t
void Set(const std::string &name, std::vector< PyCallable * > &methods)
size_t FetchError(std::vector< PyError_t > &, bool is_cpp=false)
void SetDetailedException(std::vector< PyError_t > &errors, PyObject *topmsg, PyObject *defexc)
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)
void(off) SmallVectorTemplateBase< T
CPPOverload::DispatchMap_t fDispatchMap
CPPOverload::Methods_t fMethods
static ECallFlags sMemoryPolicy
static void Clear(PyError_t &e)