diff --git a/src/exec.cpp b/src/exec.cpp index b2eabe59f..dd0c33103 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -116,7 +116,7 @@ object BOOST_PYTHON_DECL exec_file(char const *filename, object global, object l #elif PY_VERSION_HEX >= 0x03000000 // Let python open the file to avoid potential binary incompatibilities. PyObject *fo = Py_BuildValue("s", f); - FILE *fs = _Py_fopen(fo, "r"); // Private CPython API + FILE *fs = fopen(fo, "r"); Py_DECREF(fo); #else // Let python open the file to avoid potential binary incompatibilities.