2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-27 19:12:16 +00:00

Merge pull request #20 from Lastique/patch-2

Use _Py_fopen instead of fopen
This commit is contained in:
Stefan Seefeld
2015-05-27 10:59:50 -04:00

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");