Skip to content

Commit

Permalink
wip: Fix CI failure #2
Browse files Browse the repository at this point in the history
  • Loading branch information
EricCousineau-TRI committed Apr 10, 2018
1 parent 707f5b2 commit 33eabdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/pybind11/numpy_dtypes_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,10 @@ class dtype_user : public object {
// recursive loops.
tp_as_number.nb_float = &handle_nb_conversion<double>;
tp_as_number.nb_int = &handle_nb_conversion<int>;
#if PY_VERSION_HEX < 0x03000000
tp_as_number.nb_long = &handle_nb_conversion<int>;
tp_as_number.nb_coerce = &disable_nb_coerce;
#endif
// Create views into created type.
self() = reinterpret_borrow<object>(handle((PyObject*)&ClassObject_Type));
cls_ = self();
Expand Down
2 changes: 1 addition & 1 deletion tests/test_numpy_dtypes_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ TEST_SUBMODULE(numpy_dtype_user, m) {

m.def("add_one", [](py::handle in) {
auto value = py::cast<py::array_t<Custom>>(in.attr("flat"));
int count = value.size();
int count = static_cast<int>(value.size());
for (int i = 0; i < count; ++i) {
auto& x = value.mutable_at(i);
x += 1;
Expand Down

0 comments on commit 33eabdd

Please sign in to comment.