From 57ff1a5441c9fa9f74dd2b4dc96e5b9c52feb7d7 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 3 Sep 2019 12:15:02 +0200 Subject: [PATCH] interrogate: remove vestigial code causing assert for C bindings Fixes #722 --- dtool/src/interrogate/interrogateBuilder.cxx | 32 +++----------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/dtool/src/interrogate/interrogateBuilder.cxx b/dtool/src/interrogate/interrogateBuilder.cxx index 7473d085d3..4735157d1d 100644 --- a/dtool/src/interrogate/interrogateBuilder.cxx +++ b/dtool/src/interrogate/interrogateBuilder.cxx @@ -2038,33 +2038,11 @@ get_make_property(CPPMakeProperty *make_property, CPPStructType *struct_type, CP iproperty._length_function = length_function; } - if (make_property->_type == CPPMakeProperty::T_normal) { - if (getter != nullptr) { - iproperty._flags |= InterrogateElement::F_has_getter; - iproperty._getter = get_function(getter, "", struct_type, - struct_type->get_scope(), 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 (getter != nullptr) { + iproperty._flags |= InterrogateElement::F_has_getter; + iproperty._getter = get_function(getter, "", struct_type, + struct_type->get_scope(), 0); + nassertr(iproperty._getter, 0); } if (hasser != nullptr) {