Skip to content

Commit 913281d

Browse files
authored
fix: remove deprecated declarations in python bindings (#1159)
Fixes: #1032
1 parent 03a3a39 commit 913281d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/_jsonnet.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static struct JsonnetJsonValue *cpython_native_callback(
186186
}
187187

188188
// Call python function.
189-
result = PyEval_CallObject(ctx->callback, arglist);
189+
result = PyObject_CallObject(ctx->callback, arglist);
190190
Py_DECREF(arglist);
191191

192192
if (result == NULL) {
@@ -226,7 +226,7 @@ static int cpython_import_callback(void *ctx_, const char *base, const char *rel
226226

227227
PyEval_RestoreThread(*ctx->py_thread);
228228
arglist = Py_BuildValue("(s, s)", base, rel);
229-
result = PyEval_CallObject(ctx->callback, arglist);
229+
result = PyObject_CallObject(ctx->callback, arglist);
230230
Py_DECREF(arglist);
231231

232232
if (result == NULL) {

0 commit comments

Comments
 (0)