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
a9ee25a9
Commit
a9ee25a9
authored
Aug 28, 2015
by
Wenzel Jakob
Browse files
various minor compilation fixes
parent
5d4d83da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
include/pybind/cast.h
include/pybind/cast.h
+5
-2
include/pybind/functional.h
include/pybind/functional.h
+1
-1
No files found.
include/pybind/cast.h
View file @
a9ee25a9
...
...
@@ -13,6 +13,7 @@
#include <pybind/pytypes.h>
#include <pybind/typeid.h>
#include <array>
#include <limits>
NAMESPACE_BEGIN
(
pybind
)
NAMESPACE_BEGIN
(
detail
)
...
...
@@ -224,8 +225,10 @@ protected:
bool load(PyObject *src, bool) { \
py_type py_value = from_type(src); \
if ((py_value == (py_type) -1 && PyErr_Occurred()) || \
py_value < std::numeric_limits<type>::min() || \
py_value > std::numeric_limits<type>::max()) { \
(std::numeric_limits<type>::is_integer && \
sizeof(py_type) != sizeof(type) && \
(py_value < std::numeric_limits<type>::min() || \
py_value > std::numeric_limits<type>::max()))) { \
PyErr_Clear(); \
return false; \
} \
...
...
include/pybind/functional.h
View file @
a9ee25a9
...
...
@@ -24,7 +24,7 @@ public:
return
false
;
object
src
(
src_
,
true
);
value
=
[
src
](
Args
...
args
)
->
Return
{
object
retval
(
pybind
::
handle
(
src
).
call
<
Args
...
>
(
std
::
move
(
args
)...));
object
retval
(
pybind
::
handle
(
src
).
call
(
std
::
move
(
args
)...));
/* Visual studio 2015 parser issue: need parentheses around this expression */
return
(
retval
.
template
cast
<
Return
>());
};
...
...
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