Commit a9ee25a9 by Wenzel Jakob

various minor compilation fixes

parent 5d4d83da
......@@ -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; \
} \
......
......@@ -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>());
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment