We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
throw error_already_set();
1 parent 7e5edbc commit f468b07Copy full SHA for f468b07
include/pybind11/detail/internals.h
@@ -451,6 +451,7 @@ inline object get_python_state_dict() {
451
#endif
452
if (!state_dict) {
453
raise_from(PyExc_SystemError, "pybind11::detail::get_python_state_dict() FAILED");
454
+ throw error_already_set();
455
}
456
return state_dict;
457
@@ -463,6 +464,7 @@ inline internals **get_internals_pp_from_capsule(handle obj) {
463
464
void *raw_ptr = PyCapsule_GetPointer(obj.ptr(), /*name=*/nullptr);
465
if (raw_ptr == nullptr) {
466
raise_from(PyExc_SystemError, "pybind11::detail::get_internals_pp_from_capsule() FAILED");
467
468
469
return static_cast<internals **>(raw_ptr);
470
0 commit comments