3#define CPYCPPYY_INTERNAL 1
5#undef CPYCPPYY_INTERNAL
43 static bool isInitialized =
false;
49#if PY_VERSION_HEX < 0x03020000
52#if PY_VERSION_HEX < 0x03080000
60#if PY_VERSION_HEX >= 0x03020000
61#if PY_VERSION_HEX < 0x03090000
69 std::cerr <<
"Error: python has not been initialized; returning." << std::endl;
74#if PY_VERSION_HEX < 0x03000000
75 char*
argv[] = {
const_cast<char*
>(
"cppyy")};
76#elif PY_VERSION_HEX < 0x03080000
77 wchar_t*
argv[] = {
const_cast<wchar_t*
>(
L"cppyy")};
79#if PY_VERSION_HEX < 0x03080000
204 if (!t->tp_as_sequence || !t->tp_as_sequence->sq_item)
208 if (t->tp_as_sequence->sq_item ==
CPPInstance_Type.tp_as_sequence->sq_item) {
330 std::cerr <<
"Error: no file name specified." << std::endl;
336 std::cerr <<
"Error: could not open file \"" <<
name <<
"\"." << std::endl;
355 int argc = args.size() + 1;
356#if PY_VERSION_HEX < 0x03000000
358 const char**
argv =
new const char*[
argc];
359 for (
int i = 1; i <
argc; ++i)
argv[i] = args[i-1].c_str();
374 std::vector<std::wstring>
argv2;
378 for (
int i = 1; i <
argc; ++i) {
379 auto iarg = args[i - 1].c_str();
383#if PY_VERSION_HEX < 0x03080000
386 for (
int i = 0; i <
argc; ++i) {
399 fConfig.parse_argv = 1;
412 std::wcerr <<
"Error: could not append element " <<
wcstr <<
" to arglist - " <<
append_status.err_msg
417#if PY_VERSION_HEX < 0x30d00f0
507 PyObject*
module = PyObject_GetAttr(pyclass, PyStrings::gModule);
519 void*
klass =
nullptr;
static PyObject * gMainDict
static Py_ssize_t CPyCppyy_PyUnicode_AsWideChar(PyObject *pyobj, wchar_t *w, Py_ssize_t size)
#define CPyCppyy_PyText_AsString
std::ios_base::fmtflags fFlags
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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
PyTypeObject CPPInstance_Type
CPYCPPYY_EXTERN bool Instance_CheckExact(PyObject *pyobject)
CPYCPPYY_EXTERN void Prompt()
CPYCPPYY_EXTERN bool Overload_Check(PyObject *pyobject)
CPYCPPYY_EXTERN bool Overload_CheckExact(PyObject *pyobject)
CPYCPPYY_EXTERN bool Import(const std::string &name)
CPYCPPYY_EXTERN void ExecScript(const std::string &name, const std::vector< std::string > &args)
CPYCPPYY_EXTERN bool Instance_IsLively(PyObject *pyobject)
PyObject * BindCppObjectNoCast(Cppyy::TCppObject_t object, Cppyy::TCppType_t klass, const unsigned flags=0)
bool CPPOverload_Check(T *object)
CPYCPPYY_EXTERN bool Sequence_Check(PyObject *pyobject)
bool CPPScope_Check(T *object)
CPYCPPYY_EXTERN bool Instance_Check(PyObject *pyobject)
CPYCPPYY_EXTERN PyObject * Instance_FromVoidPtr(void *addr, const std::string &classname, bool python_owns=false)
CPYCPPYY_EXTERN bool Scope_CheckExact(PyObject *pyobject)
bool CPPInstance_Check(T *object)
bool CPPInstance_CheckExact(T *object)
bool CPPScope_CheckExact(T *object)
CPYCPPYY_EXTERN void * Instance_AsVoidPtr(PyObject *pyobject)
CPYCPPYY_EXTERN bool Scope_Check(PyObject *pyobject)
CPYCPPYY_EXTERN bool Exec(const std::string &cmd)
bool CPPOverload_CheckExact(T *object)
CPYCPPYY_EXTERN const PyResult Eval(const std::string &expr)
RPY_EXPORTED TCppScope_t GetScope(const std::string &scope_name)
RooArgList L(Args_t &&... args)
void Initialize(Bool_t useTMVAStyle=kTRUE)