From eefc434bae74a88927fa03dc733172bdb1c298a4 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Wed, 6 May 2015 15:29:42 +0300 Subject: [PATCH] Use _Py_fopen instead of fopen A followup fix for the previous commit 36f8f6941134583cef0fa48701a1989f2f49d4ec. --- src/exec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exec.cpp b/src/exec.cpp index 1268fbf8..aa876031 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -85,7 +85,7 @@ object BOOST_PYTHON_DECL exec_file(str filename, object global, object local) // should be 'char const *' but older python versions don't use 'const' yet. char *f = python::extract(filename); #if PY_VERSION_HEX >= 0x03040000 - FILE *fs = fopen(f, "r"); + FILE *fs = _Py_fopen(f, "r"); #elif PY_VERSION_HEX >= 0x03000000 PyObject *fo = Py_BuildValue("s", f); FILE *fs = _Py_fopen(fo, "r");