diff --git a/src/clang_convert/grib_accessor/grib_accessor_conversion_pack/grib_accessor_conversion_validation.py b/src/clang_convert/grib_accessor/grib_accessor_conversion_pack/grib_accessor_conversion_validation.py index b46b16fe0..eda5879a1 100755 --- a/src/clang_convert/grib_accessor/grib_accessor_conversion_pack/grib_accessor_conversion_validation.py +++ b/src/clang_convert/grib_accessor/grib_accessor_conversion_pack/grib_accessor_conversion_validation.py @@ -266,3 +266,11 @@ class GribAccessorConversionValidation(default_conversion_validation.DefaultConv return updated_cppmacro_instantiation return super().validate_macro_instantiation(cmacro_instantiation, cppmacro_instantiation) + + def is_cppfunction_returning_container(self, cppfunc_object): + if "initData" in cppfunc_object.as_string(): + debug.line("is_cppfunction_returning_container", f"Assuming initData returns the correct container: cppfunc_object=[{debug.as_debug_string(cppfunc_object)}]") + return True + + return super().is_cppfunction_returning_container(cppfunc_object) + diff --git a/src/clang_convert/grib_accessor/grib_accessor_conversion_pack/grib_accessor_type_info.py b/src/clang_convert/grib_accessor/grib_accessor_conversion_pack/grib_accessor_type_info.py index c64175f7b..3a9189bdd 100755 --- a/src/clang_convert/grib_accessor/grib_accessor_conversion_pack/grib_accessor_type_info.py +++ b/src/clang_convert/grib_accessor/grib_accessor_conversion_pack/grib_accessor_type_info.py @@ -11,5 +11,6 @@ class GribAccessorTypeInfo(default_type_info.DefaultTypeInfo): def cpp_container_types(self): return super().cpp_container_types() + [ + "AccessorName", "AccessorDataBuffer", ]