15 PyObject* newArgs = PyTuple_New(sz+1);
16 for (
int i = 0; i < sz; ++i) {
17 PyObject* item = PyTuple_GET_ITEM(args, i);
19 PyTuple_SET_ITEM(newArgs, i+1, item);
23 PyTuple_SET_ITEM(newArgs, 0, (
PyObject*)self);
33 if (fArgsRequired == -1 && !this->Initialize(ctxt))
39 if (!(args = this-> PreProcessArgs(self, args, kwds)))
44 bool bConvertOk = this->ConvertAndSetArgs(args, ctxt);
46 if (self || kwds) Py_DECREF(args);
48 if (bConvertOk ==
false)
52 return this->Execute(
nullptr, 0, ctxt);
67 PyObject* tmp = PyTuple_GET_ITEM(args, 0);
68 PyTuple_SET_ITEM(args, 0, PyTuple_GET_ITEM(args, 1));
69 PyTuple_SET_ITEM(args, 1, tmp);
82 if (fArgsRequired == -1 && !this->Initialize(ctxt))
87 if (!(args = this->PreProcessArgs(self, args, kwds)))
91 bool bConvertOk = this->ConvertAndSetArgs(args, ctxt);
93 if (self || kwds) Py_DECREF(args);
95 if (bConvertOk ==
false)
99 return this->Execute(
nullptr, 0, ctxt);
virtual PyObject * Call(CPPInstance *&, PyObject *args, PyObject *kwds, CallContext *ctx=nullptr)
virtual PyObject * PreProcessArgs(CPPInstance *&self, PyObject *args, PyObject *kwds)
PyObject * ProcessKeywords(PyObject *self, PyObject *args, PyObject *kwds)
virtual PyObject * Call(CPPInstance *&, PyObject *args, PyObject *kwds, CallContext *ctx=nullptr)
virtual PyObject * PreProcessArgs(CPPInstance *&self, PyObject *args, PyObject *kwds)