Fixed function pointer parse bug

This commit is contained in:
kevstone 2024-02-18 20:34:15 +00:00
parent ead59fe6f6
commit 7e949dea92
2 changed files with 10 additions and 10 deletions

View File

@ -175,18 +175,18 @@ grib_accessor_class_validity_time.cc
# LEVEL 4
#
grib_accessor_class_codeflag.cc
#grib_accessor_class_codetable.cc
#grib_accessor_class_data_complex_packing.cc
grib_accessor_class_codetable.cc
grib_accessor_class_data_complex_packing.cc
grib_accessor_class_data_g1second_order_constant_width_packing.cc
grib_accessor_class_data_g1second_order_general_extended_packing.cc
grib_accessor_class_data_g1second_order_general_packing.cc
grib_accessor_class_data_g1second_order_row_by_row_packing.cc
grib_accessor_class_data_g1simple_packing.cc
#grib_accessor_class_data_g2bifourier_packing.cc
grib_accessor_class_data_g2bifourier_packing.cc
#grib_accessor_class_data_g2simple_packing.cc
grib_accessor_class_data_jpeg2000_packing.cc
#grib_accessor_class_data_sh_packed.cc
#grib_accessor_class_data_sh_unpacked.cc
grib_accessor_class_data_sh_packed.cc
grib_accessor_class_data_sh_unpacked.cc
grib_accessor_class_g1bitmap.cc
grib_accessor_class_g1day_of_the_year_date.cc
grib_accessor_class_g1end_of_interval_monthly.cc
@ -212,8 +212,8 @@ grib_accessor_class_vector.cc
# LEVEL 5
#
grib_accessor_class_data_dummy_field.cc
#grib_accessor_class_data_g1complex_packing.cc
#grib_accessor_class_data_g2complex_packing.cc
grib_accessor_class_data_g1complex_packing.cc
grib_accessor_class_data_g2complex_packing.cc
#grib_accessor_class_data_g2simple_packing_with_preprocessing.cc
grib_accessor_class_g1_message_length.cc
grib_accessor_class_g1_section4_length.cc

View File

@ -102,8 +102,8 @@ class ConversionData:
def add_funcsig_pointer_mapping(self, mapping):
assert isinstance(mapping, funcsig_pointer_mapping.FuncSigPointerMapping), f"Expected FuncSigPointerMapping, got type=[{type(mapping).__name__}]"
for entry in self.active_map.funcsig_pointer_mappings:
if entry.cfuncsig.name == mapping.cfuncsig.name:
assert False, f"Mapping for [{mapping.cfuncsig.name}] already exists!"
if entry.cfuncsig_pointer.name == mapping.cfuncsig_pointer.name:
assert False, f"Mapping for [{mapping.cfuncsig_pointer.name}] already exists!"
self.active_map.funcsig_pointer_mappings.append(mapping)
@ -480,7 +480,7 @@ class ConversionData:
def cppfuncsig_pointer_for_cfuncsig_pointer(self, cfuncsig_pointer):
for mapping in self.all_mappings():
for entry in mapping.funcsig_pointer_mappings:
if entry.cfuncsig.name == cfuncsig_pointer.name:
if entry.cfuncsig_pointer.name == cfuncsig_pointer.name:
return entry.cppfuncsig_pointer
return None