mirror of
https://github.com/pybind/pybind11.git
synced 2026-06-08 15:29:45 +00:00
fix: throw error_already_set in py::len on failing PyObject_Length (#2575)
* Throw error_already_set in py::len on failing PyObject_Length * Fix tests to mach error message on PyPy
This commit is contained in:
@@ -407,4 +407,7 @@ TEST_SUBMODULE(pytypes, m) {
|
||||
buf, static_cast<ssize_t>(strlen(buf)));
|
||||
});
|
||||
#endif
|
||||
|
||||
// test_builtin_functions
|
||||
m.def("get_len", [](py::handle h) { return py::len(h); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user