mirror of
https://github.com/pybind/pybind11.git
synced 2024-12-01 17:37:15 +00:00
Adding minor comment (change to internals needed to distinguish uninitialized/disowned in error message).
This commit is contained in:
parent
a72e5f0c8f
commit
2f8e01748b
@ -64,7 +64,8 @@ struct smart_holder_type_caster_load {
|
||||
auto inst = reinterpret_cast<instance *>(src.ptr());
|
||||
loaded_v_h = inst->get_value_and_holder(get_type_info(typeid(T)));
|
||||
if (!loaded_v_h.holder_constructed()) {
|
||||
// IMPROVEABLE: Error message.
|
||||
// IMPROVEABLE: Error message. A change to the existing internals is
|
||||
// needed to cleanly distinguish between uninitialized or disowned.
|
||||
throw std::runtime_error("Missing value for wrapped C++ type:"
|
||||
" Python instance is uninitialized or was disowned.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user