File fix_python_312_replace_PyEval_CallObject.patch of Package python-pivy
From 30abf4114945e8a9d01b1467d580a095fd0b1498 Mon Sep 17 00:00:00 2001
From: looooo <sppedflyer@gmail.com>
Date: Sat, 2 Dec 2023 12:06:52 +0100
Subject: [PATCH] PyObject_CallObject -> PyObject_CallObject
---
Inventor/Qt/SoQtRenderArea.i | 4 ++--
Inventor/SoRenderManager.i | 2 +-
Inventor/SoSceneManager.i | 2 +-
Inventor/actions/SoCallbackAction.i | 8 ++++----
Inventor/actions/SoGLRenderAction.i | 6 +++---
Inventor/collision/SoIntersectionDetectionAction.i | 6 +++---
Inventor/draggers/SoDragger.i | 2 +-
Inventor/nodes/SoCallback.i | 2 +-
Inventor/nodes/SoEventCallback.i | 2 +-
Inventor/nodes/SoSelection.i | 6 +++---
Inventor/scxml/ScXMLStateMachine.i | 4 ++--
Inventor/sensors/SoSensor.i | 2 +-
Inventor/sensors/SoSensorManager.i | 2 +-
SoPyScript/SoPyScript.cpp | 4 ++--
VolumeViz/nodes/SoVolumeRender.i | 2 +-
interfaces/soqt.i | 12 ++++++------
interfaces/soqt2.i | 12 ++++++------
17 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/Inventor/Qt/SoQtRenderArea.i b/Inventor/Qt/SoQtRenderArea.i
index 9f51f82b..f19f0b06 100644
--- a/Inventor/Qt/SoQtRenderArea.i
+++ b/Inventor/Qt/SoQtRenderArea.i
@@ -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();
}
@@ -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;
diff --git a/Inventor/SoRenderManager.i b/Inventor/SoRenderManager.i
index 1df54c6b..729ac569 100644
--- a/Inventor/SoRenderManager.i
+++ b/Inventor/SoRenderManager.i
@@ -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();
}
diff --git a/Inventor/SoSceneManager.i b/Inventor/SoSceneManager.i
index cf2361d8..72884ccb 100644
--- a/Inventor/SoSceneManager.i
+++ b/Inventor/SoSceneManager.i
@@ -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();
}
diff --git a/Inventor/actions/SoCallbackAction.i b/Inventor/actions/SoCallbackAction.i
index d9f2de50..ed16071f 100644
--- a/Inventor/actions/SoCallbackAction.i
+++ b/Inventor/actions/SoCallbackAction.i
@@ -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 {
@@ -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();
}
@@ -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();
}
@@ -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();
}
diff --git a/Inventor/actions/SoGLRenderAction.i b/Inventor/actions/SoGLRenderAction.i
index 503a0e0b..7e0877d0 100644
--- a/Inventor/actions/SoGLRenderAction.i
+++ b/Inventor/actions/SoGLRenderAction.i
@@ -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();
}
@@ -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();
}
@@ -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();
}
diff --git a/Inventor/collision/SoIntersectionDetectionAction.i b/Inventor/collision/SoIntersectionDetectionAction.i
index 482e956c..170081cd 100644
--- a/Inventor/collision/SoIntersectionDetectionAction.i
+++ b/Inventor/collision/SoIntersectionDetectionAction.i
@@ -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 {
@@ -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 {
@@ -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 {
diff --git a/Inventor/draggers/SoDragger.i b/Inventor/draggers/SoDragger.i
index df632c9a..c7ef8bd9 100644
--- a/Inventor/draggers/SoDragger.i
+++ b/Inventor/draggers/SoDragger.i
@@ -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();
}
diff --git a/Inventor/nodes/SoCallback.i b/Inventor/nodes/SoCallback.i
index 804774f5..2943384f 100644
--- a/Inventor/nodes/SoCallback.i
+++ b/Inventor/nodes/SoCallback.i
@@ -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();
}
diff --git a/Inventor/nodes/SoEventCallback.i b/Inventor/nodes/SoEventCallback.i
index f209ac1e..5f72dae9 100644
--- a/Inventor/nodes/SoEventCallback.i
+++ b/Inventor/nodes/SoEventCallback.i
@@ -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();
}
diff --git a/Inventor/nodes/SoSelection.i b/Inventor/nodes/SoSelection.i
index ac9568af..f7afe6c9 100644
--- a/Inventor/nodes/SoSelection.i
+++ b/Inventor/nodes/SoSelection.i
@@ -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();
}
@@ -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();
}
@@ -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 {
diff --git a/Inventor/scxml/ScXMLStateMachine.i b/Inventor/scxml/ScXMLStateMachine.i
index a0abb031..c1c94f1c 100644
--- a/Inventor/scxml/ScXMLStateMachine.i
+++ b/Inventor/scxml/ScXMLStateMachine.i
@@ -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();
}
@@ -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();
}
diff --git a/Inventor/sensors/SoSensor.i b/Inventor/sensors/SoSensor.i
index ffae79b3..00c2147d 100644
--- a/Inventor/sensors/SoSensor.i
+++ b/Inventor/sensors/SoSensor.i
@@ -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();
}
diff --git a/Inventor/sensors/SoSensorManager.i b/Inventor/sensors/SoSensorManager.i
index b24e18cb..8dedcd71 100644
--- a/Inventor/sensors/SoSensorManager.i
+++ b/Inventor/sensors/SoSensorManager.i
@@ -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);
diff --git a/SoPyScript/SoPyScript.cpp b/SoPyScript/SoPyScript.cpp
index 78e6021a..c86aafcb 100644
--- a/SoPyScript/SoPyScript.cpp
+++ b/SoPyScript/SoPyScript.cpp
@@ -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);
@@ -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);
diff --git a/VolumeViz/nodes/SoVolumeRender.i b/VolumeViz/nodes/SoVolumeRender.i
index e7c5a0dd..779f454d 100644
--- a/VolumeViz/nodes/SoVolumeRender.i
+++ b/VolumeViz/nodes/SoVolumeRender.i
@@ -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();
}
diff --git a/interfaces/soqt.i b/interfaces/soqt.i
index 57d69429..0213afa0 100644
--- a/interfaces/soqt.i
+++ b/interfaces/soqt.i
@@ -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();
}
@@ -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();
}
@@ -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);
@@ -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);
@@ -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);
@@ -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);
diff --git a/interfaces/soqt2.i b/interfaces/soqt2.i
index e680c1bb..6c6ea4ca 100644
--- a/interfaces/soqt2.i
+++ b/interfaces/soqt2.i
@@ -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();
}
@@ -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();
}
@@ -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);
@@ -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);
@@ -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);
@@ -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);