Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
678d59d2
Commit
678d59d2
authored
Jul 08, 2016
by
Wenzel Jakob
Browse files
Python 2.7 fixes for eval()
parent
464c4351
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
include/pybind11/eval.h
include/pybind11/eval.h
+3
-1
No files found.
include/pybind11/eval.h
View file @
678d59d2
...
@@ -83,7 +83,9 @@ object eval_file(str fname, object global = object(), object local = object()) {
...
@@ -83,7 +83,9 @@ object eval_file(str fname, object global = object(), object local = object()) {
FILE
*
f
=
_Py_fopen
(
fname
.
ptr
(),
"r"
);
FILE
*
f
=
_Py_fopen
(
fname
.
ptr
(),
"r"
);
#else
#else
/* No unicode support in open() :( */
/* No unicode support in open() :( */
object
fobj
(
PyFile_FromString
(
fname_str
.
c_str
(),
const_cast
<
char
*>
(
"r"
)),
false
);
object
fobj
(
PyFile_FromString
(
const_cast
<
char
*>
(
fname_str
.
c_str
()),
const_cast
<
char
*>
(
"r"
)),
false
);
FILE
*
f
=
nullptr
;
FILE
*
f
=
nullptr
;
if
(
fobj
)
if
(
fobj
)
f
=
PyFile_AsFile
(
fobj
.
ptr
());
f
=
PyFile_AsFile
(
fobj
.
ptr
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment