Skip to content

Commit

Permalink
PyObject_CallObject -> PyObject_CallObject
Browse files Browse the repository at this point in the history
  • Loading branch information
looooo committed Dec 2, 2023
1 parent dc20be5 commit d77e175
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions Inventor/Qt/SoQtRenderArea.i
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ SoQtRenderAreaEventPythonCB(void * closure, QEvent * event)
{
arglist = Py_BuildValue("(nO)", event, qevent_type);

if (!(qev = PyEval_CallObject(shiboken_wrapinst_func, arglist))) {
if (!(qev = PyObject_CallObject(shiboken_wrapinst_func, arglist))) {
PyErr_Print();
}

Expand All @@ -59,7 +59,7 @@ SoQtRenderAreaEventPythonCB(void * closure, QEvent * event)
func = PyTuple_GetItem((PyObject *)closure, 0);
arglist = Py_BuildValue("(OO)", PyTuple_GetItem((PyObject *)closure, 1), qev);

if (!(result = PyEval_CallObject(func, arglist))) {
if (!(result = PyObject_CallObject(func, arglist))) {
PyErr_Print();
} else {
ret = FALSE;
Expand Down
2 changes: 1 addition & 1 deletion Inventor/SoRenderManager.i
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SoRenderManagerRenderPythonCB(void * userdata, class SoRenderManager * mgr)
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("OO", PyTuple_GetItem((PyObject *)userdata, 1), mgrCB);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down
2 changes: 1 addition & 1 deletion Inventor/SoSceneManager.i
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SoSceneManagerPythonCB(void * userdata, SoSceneManager * mgr)
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("OO", PyTuple_GetItem((PyObject *)userdata, 1), mgrCB);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down
8 changes: 4 additions & 4 deletions Inventor/actions/SoCallbackAction.i
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SoCallbackActionPythonCB(void * userdata,
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("(OOO)", PyTuple_GetItem((PyObject *)userdata, 1), acCB, pynode);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}
else {
Expand Down Expand Up @@ -49,7 +49,7 @@ SoTrianglePythonCB(void * userdata, SoCallbackAction * action,
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("(OOOOO)", PyTuple_GetItem((PyObject *)userdata, 1), acCB, vertex1, vertex2, vertex3);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down Expand Up @@ -79,7 +79,7 @@ SoLineSegmentPythonCB(void * userdata, SoCallbackAction * action,
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("(OOOO)", PyTuple_GetItem((PyObject *)userdata, 1), acCB, vertex1, vertex2);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand All @@ -105,7 +105,7 @@ SoPointPythonCB(void * userdata, SoCallbackAction * action, const SoPrimitiveVer
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("(OOO)", PyTuple_GetItem((PyObject *)userdata, 1), acCB, vertex);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down
6 changes: 3 additions & 3 deletions Inventor/actions/SoGLRenderAction.i
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SoGLRenderPassPythonCB(void * userdata)
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("O", PyTuple_GetItem((PyObject *)userdata, 1));

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand All @@ -30,7 +30,7 @@ SoGLRenderAbortPythonCB(void * userdata)
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("O", PyTuple_GetItem((PyObject *)userdata, 1));

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand All @@ -55,7 +55,7 @@ SoGLPreRenderPythonCB(void * userdata, class SoGLRenderAction * action)
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("(OO)", PyTuple_GetItem((PyObject *)userdata, 1), acCB);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down
6 changes: 3 additions & 3 deletions Inventor/collision/SoIntersectionDetectionAction.i
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SoIntersectionVisitationPythonCB(void * closure,
func = PyTuple_GetItem((PyObject *)closure, 0);
arglist = Py_BuildValue("(OO)", PyTuple_GetItem((PyObject *)closure, 1), path);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}
else {
Expand Down Expand Up @@ -45,7 +45,7 @@ SoIntersectionFilterPythonCB(void * closure,
func = PyTuple_GetItem((PyObject *)closure, 0);
arglist = Py_BuildValue("(OOO)", PyTuple_GetItem((PyObject *)closure, 1), path1, path2);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}
else {
Expand Down Expand Up @@ -77,7 +77,7 @@ SoIntersectionPythonCB(void * closure,
func = PyTuple_GetItem((PyObject *)closure, 0);
arglist = Py_BuildValue("(OOO)", PyTuple_GetItem((PyObject *)closure, 1), primitive1, primitive2);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}
else {
Expand Down
2 changes: 1 addition & 1 deletion Inventor/draggers/SoDragger.i
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SoDraggerPythonCB(void * data, SoDragger * dragger)
func = PyTuple_GetItem((PyObject *)data, 0);
arglist = Py_BuildValue("(OO)", PyTuple_GetItem((PyObject *)data, 1), dragCB);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down
2 changes: 1 addition & 1 deletion Inventor/nodes/SoCallback.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SoPythonCallBack(void * userdata, SoAction * action)
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("(OO)", PyTuple_GetItem((PyObject *)userdata, 1), acCB);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down
2 changes: 1 addition & 1 deletion Inventor/nodes/SoEventCallback.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SoEventPythonCallBack(void * userdata, SoEventCallback * node)
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("(OO)", PyTuple_GetItem((PyObject *)userdata, 1), evCB);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down
6 changes: 3 additions & 3 deletions Inventor/nodes/SoSelection.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SoSelectionPathPythonCB(void * data, SoPath * path)
func = PyTuple_GetItem((PyObject *)data, 0);
arglist = Py_BuildValue("(OO)", PyTuple_GetItem((PyObject *)data, 1), pathCB);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand All @@ -36,7 +36,7 @@ SoSelectionClassPythonCB(void * data, SoSelection * sel)
func = PyTuple_GetItem((PyObject *)data, 0);
arglist = Py_BuildValue("OO", PyTuple_GetItem((PyObject *)data, 1), selCB);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand All @@ -59,7 +59,7 @@ SoSelectionPickPythonCB(void * data, const SoPickedPoint * pick)
func = PyTuple_GetItem((PyObject *)data, 0);
arglist = Py_BuildValue("OO", PyTuple_GetItem((PyObject *)data, 1), pickCB);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}
else {
Expand Down
4 changes: 2 additions & 2 deletions Inventor/scxml/ScXMLStateMachine.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ScXMLStateMachineDeletePythonCB(void * userdata,
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("(OO)", PyTuple_GetItem((PyObject *)userdata, 1), statemachineCB);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down Expand Up @@ -41,7 +41,7 @@ ScXMLStateChangePythonCB(void * userdata,
statemachineCB, stateidentifier,
enterstate, success);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down
2 changes: 1 addition & 1 deletion Inventor/sensors/SoSensor.i
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SoSensorPythonCB(void * data, SoSensor * sensor)
func = PyTuple_GetItem((PyObject *)data, 0);
arglist = Py_BuildValue("(OO)", PyTuple_GetItem((PyObject *)data, 1), pysensor);

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down
2 changes: 1 addition & 1 deletion Inventor/sensors/SoSensorManager.i
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sensorQueueChangedPythonCB(void * userdata)
func = PyTuple_GetItem((PyObject *)userdata, 0);
arglist = Py_BuildValue("(O)", PyTuple_GetItem((PyObject *)userdata, 1));

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}
Py_DECREF(arglist);
Expand Down
4 changes: 2 additions & 2 deletions SoPyScript/SoPyScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ SoPyScript::doPyAction(SoAction * action, const char * funcname)
} else {
PyObject * argtuple = Py_BuildValue("(O)", pyAction);
PyObject * result;
if (!(result = PyEval_CallObject(func, argtuple))) {
if (!(result = PyObject_CallObject(func, argtuple))) {
PyErr_Print();
}
Py_XDECREF(result);
Expand Down Expand Up @@ -659,7 +659,7 @@ SoPyScript::eval_cb(void * data, SoSensor *)
PyErr_SetString(PyExc_TypeError, errMsg.getString());
} else {
PyObject * result;
if (!(result = PyEval_CallObject(func, NULL))) {
if (!(result = PyObject_CallObject(func, NULL))) {
PyErr_Print();
}
Py_XDECREF(result);
Expand Down
2 changes: 1 addition & 1 deletion VolumeViz/nodes/SoVolumeRender.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SoVolumeRenderAbortPythonCB(int totalslices, int thisslice, void * userdata)
PyInt_FromLong(thisslice),
PyTuple_GetItem((PyObject *)userdata, 1));

if ((result = PyEval_CallObject(func, arglist)) == NULL) {
if ((result = PyObject_CallObject(func, arglist)) == NULL) {
PyErr_Print();
}

Expand Down
12 changes: 6 additions & 6 deletions interfaces/soqt.i
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static PyObject* getShiboken()

arglist = Py_BuildValue("(nO)", $1, qevent_type);

if (!($result = PyEval_CallObject(shiboken_wrapinst_func, arglist))) {
if (!($result = PyObject_CallObject(shiboken_wrapinst_func, arglist))) {
PyErr_Print();
}

Expand Down Expand Up @@ -213,7 +213,7 @@ static PyObject* getShiboken()

arglist = Py_BuildValue("(nO)", $1, qwidget_type);

if (!($result = PyEval_CallObject(shiboken_wrapinst_func, arglist))) {
if (!($result = PyObject_CallObject(shiboken_wrapinst_func, arglist))) {
PyErr_Print();
}

Expand Down Expand Up @@ -242,7 +242,7 @@ static PyObject* getShiboken()
if (PyCallable_Check(shiboken_unwrapinst_func)) {
PyObject *arglist = NULL, *address = NULL;
arglist = Py_BuildValue("(O)", $input);
if (!(address = PyEval_CallObject(shiboken_unwrapinst_func, arglist))) {
if (!(address = PyObject_CallObject(shiboken_unwrapinst_func, arglist))) {
PyErr_Print();
} else if (PyNumber_Check(address)) {
$1 = (QEvent*)PyLong_AsVoidPtr(address);
Expand Down Expand Up @@ -277,7 +277,7 @@ static PyObject* getShiboken()
if (PyCallable_Check(shiboken_unwrapinst_func)) {
PyObject *arglist = NULL, *address = NULL;
arglist = Py_BuildValue("(O)", $input);
if (!(address = PyEval_CallObject(shiboken_unwrapinst_func, arglist))) {
if (!(address = PyObject_CallObject(shiboken_unwrapinst_func, arglist))) {
PyErr_Print();
} else if (PyNumber_Check(address)) {
$1 = (QWidget*)PyLong_AsVoidPtr(address);
Expand Down Expand Up @@ -314,7 +314,7 @@ class QWidget { QWidget(QWidget* parent=0, const char* name=0, WFlags f=0); };
if (PyCallable_Check(shiboken_unwrapinst_func)) {
PyObject *arglist = NULL, *address = NULL;
arglist = Py_BuildValue("(O)", $input);
if (!(address = PyEval_CallObject(shiboken_unwrapinst_func, arglist))) {
if (!(address = PyObject_CallObject(shiboken_unwrapinst_func, arglist))) {
PyErr_Print();
} else if (PyNumber_Check(address)) {
ptr = (QEvent*)PyLong_AsVoidPtr(address);
Expand Down Expand Up @@ -350,7 +350,7 @@ class QWidget { QWidget(QWidget* parent=0, const char* name=0, WFlags f=0); };
if (PyCallable_Check(shiboken_unwrapinst_func)) {
PyObject *arglist = NULL, *address = NULL;
arglist = Py_BuildValue("(O)", $input);
if (!(address = PyEval_CallObject(shiboken_unwrapinst_func, arglist))) {
if (!(address = PyObject_CallObject(shiboken_unwrapinst_func, arglist))) {
PyErr_Print();
} else if (PyNumber_Check(address)) {
ptr = (QWidget*)PyLong_AsVoidPtr(address);
Expand Down
12 changes: 6 additions & 6 deletions interfaces/soqt2.i
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static PyObject* getShiboken()

arglist = Py_BuildValue("(nO)", $1, qevent_type);

if (!($result = PyEval_CallObject(shiboken_wrapinst_func, arglist))) {
if (!($result = PyObject_CallObject(shiboken_wrapinst_func, arglist))) {
PyErr_Print();
}

Expand Down Expand Up @@ -191,7 +191,7 @@ static PyObject* getShiboken()

arglist = Py_BuildValue("(nO)", $1, qwidget_type);

if (!($result = PyEval_CallObject(shiboken_wrapinst_func, arglist))) {
if (!($result = PyObject_CallObject(shiboken_wrapinst_func, arglist))) {
PyErr_Print();
}

Expand Down Expand Up @@ -221,7 +221,7 @@ static PyObject* getShiboken()
if (PyCallable_Check(shiboken_unwrapinst_func)) {
PyObject *arglist = NULL, *address = NULL;
arglist = Py_BuildValue("(O)", $input);
if (!(address = PyEval_CallObject(shiboken_unwrapinst_func, arglist))) {
if (!(address = PyObject_CallObject(shiboken_unwrapinst_func, arglist))) {
PyErr_Print();
} else if (PyNumber_Check(address)) {
$1 = (QEvent*)PyLong_AsVoidPtr(address);
Expand Down Expand Up @@ -260,7 +260,7 @@ static PyObject* getShiboken()
if (PyCallable_Check(shiboken_unwrapinst_func)) {
PyObject *arglist = NULL, *address = NULL;
arglist = Py_BuildValue("(O)", $input);
if (!(address = PyEval_CallObject(shiboken_unwrapinst_func, arglist))) {
if (!(address = PyObject_CallObject(shiboken_unwrapinst_func, arglist))) {
PyErr_Print();
} else if (PyNumber_Check(address)) {
$1 = (QWidget*)PyLong_AsVoidPtr(address);
Expand Down Expand Up @@ -298,7 +298,7 @@ class QWidget { QWidget(QWidget* parent=0, const char* name=0, WFlags f=0); };
if (PyCallable_Check(shiboken_unwrapinst_func)) {
PyObject *arglist = NULL, *address = NULL;
arglist = Py_BuildValue("(O)", $input);
if (!(address = PyEval_CallObject(shiboken_unwrapinst_func, arglist))) {
if (!(address = PyObject_CallObject(shiboken_unwrapinst_func, arglist))) {
PyErr_Print();
} else if (PyNumber_Check(address)) {
ptr = (QEvent*)PyLong_AsVoidPtr(address);
Expand Down Expand Up @@ -335,7 +335,7 @@ class QWidget { QWidget(QWidget* parent=0, const char* name=0, WFlags f=0); };
if (PyCallable_Check(shiboken_unwrapinst_func)) {
PyObject *arglist = NULL, *address = NULL;
arglist = Py_BuildValue("(O)", $input);
if (!(address = PyEval_CallObject(shiboken_unwrapinst_func, arglist))) {
if (!(address = PyObject_CallObject(shiboken_unwrapinst_func, arglist))) {
PyErr_Print();
} else if (PyNumber_Check(address)) {
ptr = (QWidget*)PyLong_AsVoidPtr(address);
Expand Down

0 comments on commit d77e175

Please sign in to comment.