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
d1bfc4e0
Commit
d1bfc4e0
authored
May 16, 2016
by
Wenzel Jakob
Browse files
support __bool__ on Python 2.x and 3.x
parent
00c7d6cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
include/pybind11/pybind11.h
include/pybind11/pybind11.h
+3
-0
No files found.
include/pybind11/pybind11.h
View file @
d1bfc4e0
...
...
@@ -200,6 +200,9 @@ protected:
if
(
strcmp
(
rec
->
name
,
"__next__"
)
==
0
)
{
std
::
free
(
rec
->
name
);
rec
->
name
=
strdup
(
"next"
);
}
else
if
(
strcmp
(
rec
->
name
,
"__bool__"
)
==
0
)
{
std
::
free
(
rec
->
name
);
rec
->
name
=
strdup
(
"__nonzero__"
);
}
#endif
...
...
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