Skip to content

Commit 0a6dc9d

Browse files
committed
Fix for Python 3.13.0
python/cpython#105107
1 parent be91066 commit 0a6dc9d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎python/med_enum_typemap.i‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Type.__repr__= lambda self: #Type +"("+str(self.val)+")"
109109
if (pclass == NULL) printf("%s\n","Can't get class $1_basetype");
110110
Py_DECREF(pmod);
111111
pargs = Py_BuildValue("(i)",*$1);
112-
pinst = PyEval_CallObject(pclass, pargs);
112+
pinst = PyObject_Call(pclass, pargs, NULL);
113113
if (pinst == NULL) printf("%s\n","Can't instanciate class $1_basetype");
114114
$result=SWIG_Python_AppendOutput($result, pinst, $isvoid);
115115
}

‎python/med_enumtest_typemap.i‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public:
128128
if (pclass == NULL) printf("%s\n","Can't get class $1_basetype");
129129
Py_DECREF(pmod);
130130
pargs = Py_BuildValue("(i)",*$1);
131-
pinst = PyEval_CallObject(pclass, pargs);
131+
pinst = PyObject_Call(pclass, pargs, NULL);
132132
if (pinst == NULL) printf("%s\n","Can't instanciate class $1_basetype");
133133
$result=SWIG_Python_AppendOutput($result, pinst, $isvoid);
134134
}

0 commit comments

Comments
 (0)