2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 18:12:43 +00:00

Use _Py_fopen instead of fopen

A followup fix for the previous commit 36f8f69411.
This commit is contained in:
Andrey Semashev
2015-05-06 15:29:42 +03:00
parent 226d1ac961
commit eefc434bae

View File

@@ -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<char *>(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");