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
4ee0f2a1
Commit
4ee0f2a1
authored
Nov 29, 2015
by
Wenzel Jakob
Browse files
add missing instructor for bool_
parent
f2331666
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
include/pybind11/pytypes.h
include/pybind11/pytypes.h
+1
-0
No files found.
include/pybind11/pytypes.h
View file @
4ee0f2a1
...
...
@@ -264,6 +264,7 @@ inline pybind11::str handle::str() const {
class
bool_
:
public
object
{
public:
PYBIND11_OBJECT_DEFAULT
(
bool_
,
object
,
PyBool_Check
)
bool_
(
bool
value
)
:
object
(
value
?
Py_True
:
Py_False
,
true
)
{
}
operator
bool
()
const
{
return
m_ptr
&&
PyLong_AsLong
(
m_ptr
)
!=
0
;
}
};
...
...
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