Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
a9ee25a9
Commit
a9ee25a9
authored
Aug 28, 2015
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
various minor compilation fixes
parent
5d4d83da
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
include/pybind/cast.h
+5
-2
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