16 PyErr_Format(PyExc_NotImplementedError,
17 "no __setitem__ handler for return type (%s)",
32 PyErr_SetString(PyExc_TypeError,
"insufficient arguments to __setitem__");
37 ((
RefExecutor*)this->GetExecutor())->SetAssignable(PyTuple_GET_ITEM(args, nArgs-1));
38 PyObject* subset = PyTuple_GetSlice(args, 0, nArgs-1);
43 PyObject* item = PyTuple_GET_ITEM(subset, i);
44 realsize += PyTuple_Check(item) ? PyTuple_GET_SIZE(item) : 1;
49 if (realsize != nArgs-1) {
50 unrolled = PyTuple_New(realsize);
53 for (
int i = 0; i < nArgs - 1; ++i, ++current) {
54 PyObject* item = PyTuple_GET_ITEM(subset, i);
55 if (PyTuple_Check(item)) {
56 for (
int j = 0; j < PyTuple_GET_SIZE(item); ++j, ++current) {
57 PyObject* subitem = PyTuple_GET_ITEM(item, j);
59 PyTuple_SET_ITEM(unrolled, current, subitem);
63 PyTuple_SET_ITEM(unrolled, current, item);
89 PyObject* item = PyTuple_GET_ITEM(args, i);
90 realsize += PyTuple_Check(item) ? PyTuple_GET_SIZE(item) : 1;
95 if (realsize != nArgs-1) {
96 unrolled = PyTuple_New(realsize);
99 for (
int i = 0; i < nArgs; ++i, ++current) {
100 PyObject* item = PyTuple_GET_ITEM(args, i);
101 if (PyTuple_Check(item)) {
102 for (
int j = 0; j < PyTuple_GET_SIZE(item); ++j, ++current) {
103 PyObject* subitem = PyTuple_GET_ITEM(item, j);
105 PyTuple_SET_ITEM(unrolled, current, subitem);
109 PyTuple_SET_ITEM(unrolled, current, item);
117 Py_XDECREF(unrolled);
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
virtual PyObject * PreProcessArgs(CPPInstance *&self, PyObject *args, PyObject *kwds)
std::string GetReturnTypeName()
virtual bool InitExecutor_(Executor *&, CallContext *ctxt=nullptr)
virtual PyObject * PreProcessArgs(CPPInstance *&self, PyObject *args, PyObject *kwds)
virtual bool InitExecutor_(Executor *&, CallContext *ctxt=nullptr)
virtual PyObject * PreProcessArgs(CPPInstance *&self, PyObject *args, PyObject *kwds)