diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 6cedcc262..1a12ed0b5 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -589,7 +589,7 @@ protected: extra_args = tuple(args_size); for (size_t i = 0; i < args_size; ++i) { handle item = PyTuple_GET_ITEM(args_in, args_copied + i); - extra_args[i] = item.inc_ref().ptr(); + extra_args[i] = reinterpret_borrow(item); } } call.args.push_back(extra_args);