mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
interrogate: remove vestigial code causing assert for C bindings
Fixes #722
This commit is contained in:
parent
191a5b09e9
commit
57ff1a5441
@ -2038,33 +2038,11 @@ get_make_property(CPPMakeProperty *make_property, CPPStructType *struct_type, CP
|
|||||||
iproperty._length_function = length_function;
|
iproperty._length_function = length_function;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (make_property->_type == CPPMakeProperty::T_normal) {
|
if (getter != nullptr) {
|
||||||
if (getter != nullptr) {
|
iproperty._flags |= InterrogateElement::F_has_getter;
|
||||||
iproperty._flags |= InterrogateElement::F_has_getter;
|
iproperty._getter = get_function(getter, "", struct_type,
|
||||||
iproperty._getter = get_function(getter, "", struct_type,
|
struct_type->get_scope(), 0);
|
||||||
struct_type->get_scope(), 0);
|
nassertr(iproperty._getter, 0);
|
||||||
nassertr(iproperty._getter, 0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// We could have a mixed sequence/mapping property, so synthesize a
|
|
||||||
// getitem function. We don't really care what's in here; we just use
|
|
||||||
// this to store the remaps.
|
|
||||||
if (!iproperty.has_getter()) {
|
|
||||||
iproperty._flags |= InterrogateElement::F_has_getter;
|
|
||||||
iproperty._getter = InterrogateDatabase::get_ptr()->get_next_index();
|
|
||||||
InterrogateFunction *ifunction = new InterrogateFunction;
|
|
||||||
ifunction->_instances = new InterrogateFunction::Instances;
|
|
||||||
InterrogateDatabase::get_ptr()->add_function(iproperty._getter, ifunction);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add our getter to the generated getitem function.
|
|
||||||
string signature = TypeManager::get_function_signature(getter);
|
|
||||||
InterrogateFunction &ifunction =
|
|
||||||
InterrogateDatabase::get_ptr()->update_function(iproperty._getter);
|
|
||||||
if (ifunction._instances == nullptr) {
|
|
||||||
ifunction._instances = new InterrogateFunction::Instances;
|
|
||||||
}
|
|
||||||
ifunction._instances->insert(InterrogateFunction::Instances::value_type(signature, getter));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasser != nullptr) {
|
if (hasser != nullptr) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user