mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 23:22:01 +00:00
Tracking change in type_caster_base.h on master (PR #3059).
This commit is contained in:
parent
57a36633c4
commit
68b6f8c612
@ -164,12 +164,6 @@ public:
|
|||||||
PYBIND11_NOINLINE bool load_impl(handle src, bool convert) {
|
PYBIND11_NOINLINE bool load_impl(handle src, bool convert) {
|
||||||
if (!src) return false;
|
if (!src) return false;
|
||||||
if (!typeinfo) return try_load_foreign_module_local(src);
|
if (!typeinfo) return try_load_foreign_module_local(src);
|
||||||
if (src.is_none()) {
|
|
||||||
// Defer accepting None to other overloads (if we aren't in convert mode):
|
|
||||||
if (!convert) return false;
|
|
||||||
loaded_v_h = value_and_holder();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto &this_ = static_cast<ThisT &>(*this);
|
auto &this_ = static_cast<ThisT &>(*this);
|
||||||
|
|
||||||
@ -242,7 +236,17 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Global typeinfo has precedence over foreign module_local
|
// Global typeinfo has precedence over foreign module_local
|
||||||
return try_load_foreign_module_local(src);
|
if (try_load_foreign_module_local(src))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (src.is_none()) {
|
||||||
|
// Defer accepting None to other overloads (if we aren't in convert mode):
|
||||||
|
if (!convert) return false;
|
||||||
|
loaded_v_h = value_and_holder();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const type_info *typeinfo = nullptr;
|
const type_info *typeinfo = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user