From a8dfe613b3ade337e1c6dc87694c357ec9be2e13 Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Fri, 12 Mar 2021 13:34:41 +0100 Subject: [PATCH] fix for python 3.8 --- ortools/util/python/functions.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ortools/util/python/functions.i b/ortools/util/python/functions.i index 47807d6278..1864ffaea2 100644 --- a/ortools/util/python/functions.i +++ b/ortools/util/python/functions.i @@ -218,7 +218,7 @@ static ReturnT InvokePythonCallableReturning(PyObject* pyfunc) { PyObject* py_str = PyUnicode_FromStringAndSize(str.c_str(), str.size()); PyObject* result; SWIG_PYTHON_THREAD_BEGIN_BLOCK; - result = PyObject_CallOneArg(input.get(), py_str); + result = PyObject_CallFunction(input.get(), "O", py_str); SWIG_PYTHON_THREAD_END_BLOCK; Py_DECREF(py_str); return result;