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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user