Skip to content

Commit eefc434

Browse files
committed
Use _Py_fopen instead of fopen
A followup fix for the previous commit 36f8f69.
1 parent 226d1ac commit eefc434

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/exec.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ object BOOST_PYTHON_DECL exec_file(str filename, object global, object local)
8585
// should be 'char const *' but older python versions don't use 'const' yet.
8686
char *f = python::extract<char *>(filename);
8787
#if PY_VERSION_HEX >= 0x03040000
88-
FILE *fs = fopen(f, "r");
88+
FILE *fs = _Py_fopen(f, "r");
8989
#elif PY_VERSION_HEX >= 0x03000000
9090
PyObject *fo = Py_BuildValue("s", f);
9191
FILE *fs = _Py_fopen(fo, "r");

0 commit comments

Comments
 (0)