38 GILControl() : fSave(PyEval_SaveThread()) { }
40 PyEval_RestoreThread(fSave);
50#define CPPYY_IMPL_GILCALL(rtype, tcode) \
51static inline rtype GILCall##tcode( \
52 Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext* ctxt)\
54 if (!ReleasesGIL(ctxt)) \
55 return Cppyy::Call##tcode(method, self, ctxt->GetEncodedSize(), ctxt->GetArgs());\
57 return Cppyy::Call##tcode(method, self, ctxt->GetEncodedSize(), ctxt->GetArgs());\
60#define CPPYY_IMPL_GILCALL(rtype, tcode) \
61static inline rtype GILCall##tcode( \
62 Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext* ctxt)\
64 return Cppyy::Call##tcode(method, self, ctxt->GetEncodedSize(), ctxt->GetArgs());\
86 return Cppyy::CallO(method, self, ctxt->GetEncodedSize(), ctxt->GetArgs(), klass);
89 return Cppyy::CallO(method, self, ctxt->GetEncodedSize(), ctxt->GetArgs(), klass);
109 if (cl < -256 || cl > 255) {
110 PyErr_SetString(PyExc_ValueError,
"char conversion out of range");
122 PyErr_SetString(PyExc_ValueError,
"char conversion out of range");
144PyObject* CPyCppyy::BoolExecutor::Execute(
148 bool retval =
GILCallB(method, self, ctxt);
155PyObject* CPyCppyy::BoolConstRefExecutor::Execute(
163PyObject* CPyCppyy::CharExecutor::Execute(
172PyObject* CPyCppyy::CharConstRefExecutor::Execute(
181PyObject* CPyCppyy::UCharExecutor::Execute(
190PyObject* CPyCppyy::UCharConstRefExecutor::Execute(
199PyObject* CPyCppyy::WCharExecutor::Execute(
204 wchar_t res = (wchar_t)
GILCallL(method, self, ctxt);
205 return PyUnicode_FromWideChar(&res, 1);
209PyObject* CPyCppyy::Char16Executor::Execute(
214 char16_t res = (char16_t)
GILCallL(method, self, ctxt);
215 return PyUnicode_DecodeUTF16((
const char*)&res,
sizeof(
char16_t),
nullptr,
nullptr);
219PyObject* CPyCppyy::Char32Executor::Execute(
224 char32_t res = (char32_t)
GILCallL(method, self, ctxt);
225 return PyUnicode_DecodeUTF32((
const char*)&res,
sizeof(
char32_t),
nullptr,
nullptr);
229PyObject* CPyCppyy::IntExecutor::Execute(
233 return PyInt_FromLong((
int)
GILCallI(method, self, ctxt));
237PyObject* CPyCppyy::Int8Executor::Execute(
241 return PyInt_FromLong((int8_t)
GILCallC(method, self, ctxt));
245PyObject* CPyCppyy::UInt8Executor::Execute(
249 return PyInt_FromLong((uint8_t)
GILCallB(method, self, ctxt));
253PyObject* CPyCppyy::ShortExecutor::Execute(
257 return PyInt_FromLong((
short)
GILCallH(method, self, ctxt));
261PyObject* CPyCppyy::LongExecutor::Execute(
265 return PyLong_FromLong((
long)
GILCallL(method, self, ctxt));
269PyObject* CPyCppyy::ULongExecutor::Execute(
273 return PyLong_FromUnsignedLong((
unsigned long)
GILCallLL(method, self, ctxt));
277PyObject* CPyCppyy::LongLongExecutor::Execute(
282 return PyLong_FromLongLong(
result);
286PyObject* CPyCppyy::ULongLongExecutor::Execute(
291 return PyLong_FromUnsignedLongLong(
result);
295PyObject* CPyCppyy::FloatExecutor::Execute(
299 return PyFloat_FromDouble((
double)
GILCallF(method, self, ctxt));
303PyObject* CPyCppyy::DoubleExecutor::Execute(
307 return PyFloat_FromDouble((
double)
GILCallD(method, self, ctxt));
311PyObject* CPyCppyy::LongDoubleExecutor::Execute(
315 return PyFloat_FromDouble((
double)
GILCallLD(method, self, ctxt));
324 fAssignable = pyobject;
328 fAssignable =
nullptr;
333#define CPPYY_IMPL_REFEXEC(name, type, stype, F1, F2) \
334PyObject* CPyCppyy::name##RefExecutor::Execute( \
335 Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CallContext* ctxt) \
337 type* ref = (type*)GILCallR(method, self, ctxt); \
339 PyErr_SetString(PyExc_ReferenceError, "attempt to access a null-pointer");\
343 return F1((stype)*ref); \
345 *ref = (type)F2(fAssignable); \
346 Py_DECREF(fAssignable); \
347 fAssignable = nullptr; \
348 if (*ref == (type)-1 && PyErr_Occurred()) \
350 Py_INCREF(Py_None); \
374 return PyComplex_FromDoubles(
c.real(),
c.imag());
379 Py_complex cplx = PyComplex_AsCComplex(pycplx);
380 return std::complex<T>(cplx.real, cplx.imag);
384 std::complex<double>, PyComplex_FromComplex<double>, PyComplex_AsComplex<double>)
388PyObject* CPyCppyy::STLStringRefExecutor::Execute(
400 Py_DECREF(fAssignable);
401 fAssignable =
nullptr;
407PyObject* CPyCppyy::VoidExecutor::Execute(
412 if (PyErr_Occurred())
return nullptr;
417PyObject* CPyCppyy::CStringExecutor::Execute(
431PyObject* CPyCppyy::CStringRefExecutor::Execute(
445PyObject* CPyCppyy::WCStringExecutor::Execute(
452 return PyUnicode_FromWideChar(&
w, 0);
459PyObject* CPyCppyy::CString16Executor::Execute(
466 return PyUnicode_DecodeUTF16((
const char*)&
w, 0,
nullptr,
nullptr);
469 return PyUnicode_DecodeUTF16((
const char*)
result,
470 std::char_traits<char16_t>::length(
result)*
sizeof(
char16_t),
nullptr,
nullptr);
474PyObject* CPyCppyy::CString32Executor::Execute(
481 return PyUnicode_DecodeUTF32((
const char*)&
w, 0,
nullptr,
nullptr);
484 return PyUnicode_DecodeUTF32((
const char*)
result,
485 std::char_traits<char32_t>::length(
result)*
sizeof(
char32_t),
nullptr,
nullptr);
490PyObject* CPyCppyy::VoidArrayExecutor::Execute(
503#define CPPYY_IMPL_ARRAY_EXEC(name, type, suffix) \
504PyObject* CPyCppyy::name##ArrayExecutor::Execute( \
505 Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CallContext* ctxt) \
507 return CreateLowLevelView##suffix((type*)GILCallR(method, self, ctxt), fShape); \
512#if __cplusplus > 201402L
534#define CPPYY_COMPLEX_EXEC(code, type) \
535PyObject* CPyCppyy::Complex##code##Executor::Execute( \
536 Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CallContext* ctxt) \
538 static Cppyy::TCppScope_t scopeid = Cppyy::GetScope("std::complex<"#type">");\
539 std::complex<type>* result = \
540 (std::complex<type>*)GILCallO(method, self, ctxt, scopeid); \
542 PyErr_SetString(PyExc_ValueError, "NULL result where temporary expected");\
546 PyObject* pyres = PyComplex_FromDoubles(result->real(), result->imag()); \
547 ::operator delete(result);
\
554PyObject* CPyCppyy::STLStringExecutor::Execute(
561 std::string*
result = (std::string*)
GILCallO(method, self, ctxt, sSTLStringScope);
575PyObject* CPyCppyy::STLWStringExecutor::Execute(
580 std::wstring*
result = (std::wstring*)
GILCallO(method, self, ctxt, sSTLWStringScope);
583 return PyUnicode_FromWideChar(&
w, 0);
593PyObject* CPyCppyy::InstancePtrExecutor::Execute(
608PyObject* CPyCppyy::InstanceExecutor::Execute(
615 if (!PyErr_Occurred())
616 PyErr_SetString(PyExc_ValueError,
"nullptr result where temporary expected");
633 InstanceExecutor(klass)
639PyObject* CPyCppyy::IteratorExecutor::Execute(
642 PyObject* iter = this->InstanceExecutor::Execute(method, self, ctxt);
646 std::ostringstream attr_name;
647 attr_name <<
"__" << (intptr_t)iter;
648 if (PyObject_SetAttrString(ctxt->
fPyContext, (
char*)attr_name.str().c_str(), iter))
655PyObject* CPyCppyy::InstanceRefExecutor::Execute(
660 if (!
result || !fAssignable)
669 PyErr_Format(PyExc_TypeError,
"cannot assign to return object (%s)",
672 PyErr_SetString(PyExc_TypeError,
"cannot assign to result");
676 Py_DECREF(fAssignable); fAssignable =
nullptr;
680 PyObject* res2 = PyObject_CallFunction(assign,
const_cast<char*
>(
"O"), fAssignable);
684 Py_DECREF(fAssignable); fAssignable =
nullptr;
697 PyObject* pystr = PyObject_Str(pyobj);
699 PyErr_Format(PyExc_TypeError,
703 PyErr_SetString(PyExc_TypeError,
"C++ object expected");
707PyObject* CPyCppyy::InstancePtrPtrExecutor::Execute(
723 Py_DECREF(fAssignable);
724 fAssignable =
nullptr;
730PyObject* CPyCppyy::InstancePtrRefExecutor::Execute(
745 Py_DECREF(fAssignable);
746 fAssignable =
nullptr;
753PyObject* CPyCppyy::InstanceArrayExecutor::Execute(
762PyObject* CPyCppyy::ConstructorExecutor::Execute(
771PyObject* CPyCppyy::PyObjectExecutor::Execute(
779PyObject* CPyCppyy::FunctionPointerExecutor::Execute(
787 void* address = (
void*)
GILCallR(method, self, ctxt);
790 PyErr_SetString(PyExc_TypeError,
"can not convert null function pointer");
808 return (
h->second)(dims);
814 if (resolvedType != fullType) {
817 return (
h->second)(dims);
821 bool isConst = strncmp(resolvedType.c_str(),
"const", 5) == 0;
828 return (
h->second)(dims);
836 return (
h->second)(dims);
840 if (!cpd.empty() && (std::string::size_type)std::count(cpd.begin(), cpd.end(),
'*') == cpd.size()) {
843 return (
h->second)((!dims || dims.
ndim() < (
dim_t)cpd.size()) ?
dims_t(cpd.size()) : dims);
850 return (
h->second)(dims);
858 return new IteratorExecutor(klass);
862 result =
new InstanceExecutor(klass);
864 result =
new InstanceRefExecutor(klass);
865 else if (cpd ==
"**" || cpd ==
"*[]" || cpd ==
"&*")
866 result =
new InstancePtrPtrExecutor(klass);
867 else if (cpd ==
"*&")
868 result =
new InstancePtrRefExecutor(klass);
869 else if (cpd ==
"[]") {
872 result =
new InstanceArrayExecutor(klass, asize);
874 result =
new InstancePtrRefExecutor(klass);
876 result =
new InstancePtrExecutor(klass);
877 }
else if (resolvedType.find(
"(*)") != std::string::npos ||
878 (resolvedType.find(
"::*)") != std::string::npos)) {
881 auto pos1 = resolvedType.find(
'(');
882 auto pos2 = resolvedType.find(
"*)");
883 auto pos3 = resolvedType.rfind(
')');
884 result =
new FunctionPointerExecutor(
885 resolvedType.substr(0, pos1), resolvedType.substr(pos2+2, pos3-pos2-1));
902 if (
p &&
p->HasState())
962#define WSTRING1 "std::basic_string<wchar_t>"
963#define WSTRING2 "std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>"
967#define CCOMPLEX_D "_Complex double"
968#define CCOMPLEX_F "_Complex float"
970#define CCOMPLEX_D "_C_double_complex"
971#define CCOMPLEX_F "_C_float_complex"
974struct InitExecFactories_t {
976 InitExecFactories_t() {
981 gf[
"bool"] = (
ef_t)+[](
cdims_t) {
static BoolExecutor
e{};
return &
e; };
982 gf[
"bool&"] = (
ef_t)+[](
cdims_t) {
return new BoolRefExecutor{}; };
983 gf[
"const bool&"] = (
ef_t)+[](
cdims_t) {
static BoolConstRefExecutor
e{};
return &
e; };
984 gf[
"char"] = (
ef_t)+[](
cdims_t) {
static CharExecutor
e{};
return &
e; };
985 gf[
"signed char"] = gf[
"char"];
986 gf[
"unsigned char"] = (
ef_t)+[](
cdims_t) {
static UCharExecutor
e{};
return &
e; };
987 gf[
"char&"] = (
ef_t)+[](
cdims_t) {
return new CharRefExecutor{}; };
988 gf[
"signed char&"] = gf[
"char&"];
989 gf[
"unsigned char&"] = (
ef_t)+[](
cdims_t) {
return new UCharRefExecutor{}; };
990 gf[
"const char&"] = (
ef_t)+[](
cdims_t) {
static CharConstRefExecutor
e{};
return &
e; };
991 gf[
"const signed char&"] = gf[
"const char&"];
992 gf[
"const unsigned char&"] = (
ef_t)+[](
cdims_t) {
static UCharConstRefExecutor
e{};
return &
e; };
993 gf[
"wchar_t"] = (
ef_t)+[](
cdims_t) {
static WCharExecutor
e{};
return &
e; };
994 gf[
"char16_t"] = (
ef_t)+[](
cdims_t) {
static Char16Executor
e{};
return &
e; };
995 gf[
"char32_t"] = (
ef_t)+[](
cdims_t) {
static Char32Executor
e{};
return &
e; };
996 gf[
"int8_t"] = (
ef_t)+[](
cdims_t) {
static Int8Executor
e{};
return &
e; };
997 gf[
"int8_t&"] = (
ef_t)+[](
cdims_t) {
return new Int8RefExecutor{}; };
998 gf[
"const int8_t&"] = (
ef_t)+[](
cdims_t) {
static Int8RefExecutor
e{};
return &
e; };
999 gf[
"uint8_t"] = (
ef_t)+[](
cdims_t) {
static UInt8Executor
e{};
return &
e; };
1000 gf[
"uint8_t&"] = (
ef_t)+[](
cdims_t) {
return new UInt8RefExecutor{}; };
1001 gf[
"const uint8_t&"] = (
ef_t)+[](
cdims_t) {
static UInt8RefExecutor
e{};
return &
e; };
1002 gf[
"short"] = (
ef_t)+[](
cdims_t) {
static ShortExecutor
e{};
return &
e; };
1003 gf[
"short&"] = (
ef_t)+[](
cdims_t) {
return new ShortRefExecutor{}; };
1004 gf[
"int"] = (
ef_t)+[](
cdims_t) {
static IntExecutor
e{};
return &
e; };
1005 gf[
"int&"] = (
ef_t)+[](
cdims_t) {
return new IntRefExecutor{}; };
1006 gf[
"unsigned short"] = gf[
"int"];
1007 gf[
"unsigned short&"] = (
ef_t)+[](
cdims_t) {
return new UShortRefExecutor{}; };
1008 gf[
"unsigned long"] = (
ef_t)+[](
cdims_t) {
static ULongExecutor
e{};
return &
e; };
1009 gf[
"unsigned long&"] = (
ef_t)+[](
cdims_t) {
return new ULongRefExecutor{}; };
1010 gf[
"unsigned int"] = gf[
"unsigned long"];
1011 gf[
"unsigned int&"] = (
ef_t)+[](
cdims_t) {
return new UIntRefExecutor{}; };
1012 gf[
"long"] = (
ef_t)+[](
cdims_t) {
static LongExecutor
e{};
return &
e; };
1013 gf[
"long&"] = (
ef_t)+[](
cdims_t) {
return new LongRefExecutor{}; };
1014 gf[
"unsigned long"] = (
ef_t)+[](
cdims_t) {
static ULongExecutor
e{};
return &
e; };
1015 gf[
"unsigned long&"] = (
ef_t)+[](
cdims_t) {
return new ULongRefExecutor{}; };
1016 gf[
"long long"] = (
ef_t)+[](
cdims_t) {
static LongLongExecutor
e{};
return &
e; };
1017 gf[
"long long&"] = (
ef_t)+[](
cdims_t) {
return new LongLongRefExecutor{}; };
1018 gf[
"unsigned long long"] = (
ef_t)+[](
cdims_t) {
static ULongLongExecutor
e{};
return &
e; };
1019 gf[
"unsigned long long&"] = (
ef_t)+[](
cdims_t) {
return new ULongLongRefExecutor{}; };
1021 gf[
"float"] = (
ef_t)+[](
cdims_t) {
static FloatExecutor
e{};
return &
e; };
1022 gf[
"float&"] = (
ef_t)+[](
cdims_t) {
return new FloatRefExecutor{}; };
1023 gf[
"double"] = (
ef_t)+[](
cdims_t) {
static DoubleExecutor
e{};
return &
e; };
1024 gf[
"double&"] = (
ef_t)+[](
cdims_t) {
return new DoubleRefExecutor{}; };
1025 gf[
"long double"] = (
ef_t)+[](
cdims_t) {
static LongDoubleExecutor
e{};
return &
e; };
1026 gf[
"long double&"] = (
ef_t)+[](
cdims_t) {
return new LongDoubleRefExecutor{}; };
1027 gf[
"std::complex<double>"] = (
ef_t)+[](
cdims_t) {
static ComplexDExecutor
e{};
return &
e; };
1028 gf[
"std::complex<double>&"] = (
ef_t)+[](
cdims_t) {
return new ComplexDRefExecutor{}; };
1029 gf[
"void"] = (
ef_t)+[](
cdims_t) {
static VoidExecutor
e{};
return &
e; };
1032 gf[
"void ptr"] = (
ef_t)+[](
cdims_t d) {
return new VoidArrayExecutor{
d}; };
1033 gf[
"bool ptr"] = (
ef_t)+[](
cdims_t d) {
return new BoolArrayExecutor{
d}; };
1034 gf[
"unsigned char ptr"] = (
ef_t)+[](
cdims_t d) {
return new UCharArrayExecutor{
d}; };
1035 gf[
"const unsigned char ptr"] = gf[
"unsigned char ptr"];
1036#if __cplusplus > 201402L
1037 gf[
"std::byte ptr"] = (
ef_t)+[](
cdims_t d) {
return new ByteArrayExecutor{
d}; };
1038 gf[
"const std::byte ptr"] = gf[
"std::byte ptr"];
1040 gf[
"int8_t ptr"] = (
ef_t)+[](
cdims_t d) {
return new Int8ArrayExecutor{
d}; };
1041 gf[
"uint8_t ptr"] = (
ef_t)+[](
cdims_t d) {
return new UInt8ArrayExecutor{
d}; };
1042 gf[
"short ptr"] = (
ef_t)+[](
cdims_t d) {
return new ShortArrayExecutor{
d}; };
1043 gf[
"unsigned short ptr"] = (
ef_t)+[](
cdims_t d) {
return new UShortArrayExecutor{
d}; };
1044 gf[
"int ptr"] = (
ef_t)+[](
cdims_t d) {
return new IntArrayExecutor{
d}; };
1045 gf[
"unsigned int ptr"] = (
ef_t)+[](
cdims_t d) {
return new UIntArrayExecutor{
d}; };
1046 gf[
"long ptr"] = (
ef_t)+[](
cdims_t d) {
return new LongArrayExecutor{
d}; };
1047 gf[
"unsigned long ptr"] = (
ef_t)+[](
cdims_t d) {
return new ULongArrayExecutor{
d}; };
1048 gf[
"long long ptr"] = (
ef_t)+[](
cdims_t d) {
return new LLongArrayExecutor{
d}; };
1049 gf[
"unsigned long long ptr"] = (
ef_t)+[](
cdims_t d) {
return new ULLongArrayExecutor{
d}; };
1050 gf[
"float ptr"] = (
ef_t)+[](
cdims_t d) {
return new FloatArrayExecutor{
d}; };
1051 gf[
"double ptr"] = (
ef_t)+[](
cdims_t d) {
return new DoubleArrayExecutor{
d}; };
1052 gf[
"std::complex<float> ptr"] = (
ef_t)+[](
cdims_t d) {
return new ComplexFArrayExecutor{
d}; };
1053 gf[
"std::complex<double> ptr"] = (
ef_t)+[](
cdims_t d) {
return new ComplexDArrayExecutor{
d}; };
1054 gf[
"std::complex<int> ptr"] = (
ef_t)+[](
cdims_t d) {
return new ComplexIArrayExecutor{
d}; };
1055 gf[
"std::complex<long> ptr"] = (
ef_t)+[](
cdims_t d) {
return new ComplexLArrayExecutor{
d}; };
1058 gf[
"internal_enum_type_t"] = gf[
"int"];
1059 gf[
"internal_enum_type_t&"] = gf[
"int&"];
1060 gf[
"internal_enum_type_t ptr"] = gf[
"int ptr"];
1061#if __cplusplus > 201402L
1062 gf[
"std::byte"] = gf[
"uint8_t"];
1063 gf[
"std::byte&"] = gf[
"uint8_t&"];
1064 gf[
"const std::byte&"] = gf[
"const uint8_t&"];
1066 gf[
"std::int8_t"] = gf[
"int8_t"];
1067 gf[
"std::int8_t&"] = gf[
"int8_t&"];
1068 gf[
"const std::int8_t&"] = gf[
"const int8_t&"];
1069 gf[
"std::int8_t ptr"] = gf[
"int8_t ptr"];
1070 gf[
"std::uint8_t"] = gf[
"uint8_t"];
1071 gf[
"std::uint8_t&"] = gf[
"uint8_t&"];
1072 gf[
"const std::uint8_t&"] = gf[
"const uint8_t&"];
1073 gf[
"std::uint8_t ptr"] = gf[
"uint8_t ptr"];
1075 gf[
"__int64"] = gf[
"long long"];
1076 gf[
"__int64&"] = gf[
"long long&"];
1077 gf[
"__int64 ptr"] = gf[
"long long ptr"];
1078 gf[
"unsigned __int64"] = gf[
"unsigned long long"];
1079 gf[
"unsigned __int64&"] = gf[
"unsigned long long&"];
1080 gf[
"unsigned __int64 ptr"] = gf[
"unsigned long long ptr"];
1083 gf[
CCOMPLEX_D "&"] = gf[
"std::complex<double>&"];
1084 gf[
CCOMPLEX_F " ptr"] = gf[
"std::complex<float> ptr"];
1085 gf[
CCOMPLEX_D " ptr"] = gf[
"std::complex<double> ptr"];
1088 gf[
"const char*"] = (
ef_t)+[](
cdims_t) {
static CStringExecutor
e{};
return &
e; };
1089 gf[
"char*"] = gf[
"const char*"];
1090 gf[
"const char*&"] = (
ef_t)+[](
cdims_t) {
static CStringRefExecutor
e{};
return &
e; };
1091 gf[
"char*&"] = gf[
"const char*&"];
1092 gf[
"const signed char*"] = gf[
"const char*"];
1093 gf[
"signed char*"] = gf[
"char*"];
1094 gf[
"wchar_t*"] = (
ef_t)+[](
cdims_t) {
static WCStringExecutor
e{};
return &
e;};
1095 gf[
"char16_t*"] = (
ef_t)+[](
cdims_t) {
static CString16Executor
e{};
return &
e;};
1096 gf[
"char32_t*"] = (
ef_t)+[](
cdims_t) {
static CString32Executor
e{};
return &
e;};
1097 gf[
"std::string"] = (
ef_t)+[](
cdims_t) {
static STLStringExecutor
e{};
return &
e; };
1098 gf[
"string"] = gf[
"std::string"];
1099 gf[
"std::string&"] = (
ef_t)+[](
cdims_t) {
return new STLStringRefExecutor{}; };
1100 gf[
"string&"] = gf[
"std::string&"];
1101 gf[
"std::wstring"] = (
ef_t)+[](
cdims_t) {
static STLWStringExecutor
e{};
return &
e; };
1104 gf[
"__init__"] = (
ef_t)+[](
cdims_t) {
static ConstructorExecutor
e{};
return &
e; };
1105 gf[
"PyObject*"] = (
ef_t)+[](
cdims_t) {
static PyObjectExecutor
e{};
return &
e; };
1106 gf[
"_object*"] = gf[
"PyObject*"];
1107 gf[
"FILE*"] = gf[
"void ptr"];
1109} initExecvFactories_;
#define CPyCppyy_PyText_FromStringAndSize
#define CPyCppyy_PyText_AsString
#define CPyCppyy_PyText_GET_SIZE
#define CPyCppyy_PyText_FromFormat
#define CPyCppyy_PyText_CheckExact
#define CPyCppyy_PyText_FromString
long double PY_LONG_DOUBLE
unsigned long long PY_ULONG_LONG
static PyObject * PyComplex_FromComplex(const std::complex< T > &c)
static char GILCallC(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
static float GILCallF(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
static PyObject * CPyCppyy_PyText_FromLong(long cl)
static PyObject * SetInstanceCheckError(PyObject *pyobj)
static std::complex< T > PyComplex_AsComplex(PyObject *pycplx)
static Cppyy::TCppObject_t GILCallO(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt, Cppyy::TCppType_t klass)
static PY_LONG_DOUBLE GILCallLD(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
#define CPPYY_IMPL_GILCALL(rtype, tcode)
static Cppyy::TCppObject_t GILCallConstructor(Cppyy::TCppMethod_t method, Cppyy::TCppType_t klass, CPyCppyy::CallContext *ctxt)
static long GILCallL(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
#define CPPYY_COMPLEX_EXEC(code, type)
static short GILCallH(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
static PyObject * CPyCppyy_PyText_FromULong(unsigned long uc)
static PyObject * CPyCppyy_PyBool_FromLong(long b)
static void GILCallV(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
static PY_LONG_LONG GILCallLL(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
#define CPPYY_IMPL_ARRAY_EXEC(name, type, suffix)
static void * GILCallR(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
#define CPPYY_IMPL_REFEXEC(name, type, stype, F1, F2)
static unsigned char GILCallB(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
static double GILCallD(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
static int GILCallI(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, CPyCppyy::CallContext *ctxt)
std::ios_base::fmtflags fFlags
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 Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
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 gc
virtual bool SetAssignable(PyObject *)
std::string remove_const(const std::string &cppname)
Py_ssize_t array_size(const std::string &name)
std::string clean_type(const std::string &cppname, bool template_strip=true, bool const_strip=true)
std::string compound(const std::string &name)
PyObject * FuncPtr2StdFunction(const std::string &retType, const std::string &signature, void *address)
bool IsSTLIterator(const std::string &classname)
unsigned long PyLongOrInt_AsULong(PyObject *pyobject)
CPYCPPYY_EXTERN bool UnregisterExecutor(const std::string &name)
CPYCPPYY_EXTERN bool RegisterExecutorAlias(const std::string &name, const std::string &target)
PyObject * BindCppObjectNoCast(Cppyy::TCppObject_t object, Cppyy::TCppType_t klass, const unsigned flags=0)
CPYCPPYY_EXPORT void DestroyExecutor(Executor *p)
CPYCPPYY_EXTERN bool RegisterExecutor(const std::string &name, ExecutorFactory_t)
CPYCPPYY_EXTERN Executor * CreateExecutor(const std::string &name, cdims_t=0)
std::map< std::string, ef_t > ExecFactories_t
PY_ULONG_LONG PyLongOrInt_AsULong64(PyObject *pyobject)
bool CPPInstance_Check(T *object)
Executor *(* ef_t)(cdims_t)
PyObject * BindCppObjectArray(Cppyy::TCppObject_t address, Cppyy::TCppType_t klass, cdims_t dims)
PyObject * CreatePointerView(void *ptr, cdims_t shape=0)
PyObject * gNullPtrObject
static ExecFactories_t gExecFactories
std::set< std::string > gIteratorTypes
PyObject * BindCppObject(Cppyy::TCppObject_t object, Cppyy::TCppType_t klass, const unsigned flags=0)
CPYCPPYY_EXTERN void * CallVoidP(Cppyy::TCppMethod_t, Cppyy::TCppObject_t, CallContext *)
bool ReleasesGIL(CallContext *ctxt)
RPY_EXPORTED TCppObject_t CallO(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args, TCppType_t result_type)
RPY_EXPORTED TCppObject_t CallConstructor(TCppMethod_t method, TCppType_t type, size_t nargs, void *args)
RPY_EXPORTED std::string ResolveName(const std::string &cppitem_name)
RPY_EXPORTED TCppScope_t GetScope(const std::string &scope_name)
RooArgList L(Args_t &&... args)
Parameter * GetArgs(size_t sz)