diff --git a/src/eccodes_prototypes.h b/src/eccodes_prototypes.h index 6c8ee54a0..2d3ddab7d 100644 --- a/src/eccodes_prototypes.h +++ b/src/eccodes_prototypes.h @@ -155,7 +155,7 @@ int grib_accessor_replace_attribute(grib_accessor* a, grib_accessor* attr); int grib_accessor_delete_attribute(grib_accessor* a, const char* name); grib_accessor* grib_accessor_get_attribute_by_index(grib_accessor* a, int index); const char* grib_accessor_get_name(grib_accessor* a); -grib_accessor* ecc__grib_accessor_get_attribute(grib_accessor* a, const char* name, int* index); +grib_accessor* grib_accessor_get_attribute_index(grib_accessor* a, const char* name, int* index); int grib_accessor_has_attributes(grib_accessor* a); grib_accessor* grib_accessor_get_attribute(grib_accessor* a, const char* name); grib_accessors_list* grib_accessors_list_create(grib_context* c); @@ -1112,7 +1112,7 @@ char* get_external_template_path(grib_context* c, const char* name); grib_handle* grib_handle_of_accessor(const grib_accessor* a); void grib_dependency_add(grib_accessor* observer, grib_accessor* observed); void grib_dependency_remove_observed(grib_accessor* observed); -int ecc__grib_dependency_notify_change(grib_handle* h, grib_accessor* observed); +int grib_dependency_notify_change_h(grib_handle* h, grib_accessor* observed); int grib_dependency_notify_change(grib_accessor* observed); void grib_dependency_remove_observer(grib_accessor* observer); void grib_dependency_observe_expression(grib_accessor* observer, grib_expression* e); diff --git a/src/grib_accessor.cc b/src/grib_accessor.cc index 58cf51c0e..62d4c5e59 100644 --- a/src/grib_accessor.cc +++ b/src/grib_accessor.cc @@ -703,7 +703,7 @@ int grib_accessor_add_attribute(grib_accessor* a, grib_accessor* attr, int nest_ grib_accessor* aloc = a; if (grib_accessor_has_attributes(a)) { - same = ecc__grib_accessor_get_attribute(a, attr->name, &id); + same = grib_accessor_get_attribute_index(a, attr->name, &id); } if (same) { @@ -718,7 +718,7 @@ int grib_accessor_add_attribute(grib_accessor* a, grib_accessor* attr, int nest_ aloc->attributes[id] = attr; attr->parent_as_attribute = aloc; if (aloc->same) - attr->same = ecc__grib_accessor_get_attribute(aloc->same, attr->name, &idx); + attr->same = grib_accessor_get_attribute_index(aloc->same, attr->name, &idx); grib_context_log(a->context, GRIB_LOG_DEBUG, "added attribute %s->%s", a->name, attr->name); return GRIB_SUCCESS; @@ -731,12 +731,12 @@ int grib_accessor_replace_attribute(grib_accessor* a, grib_accessor* attr) { int id = 0; int idx = 0; - if (ecc__grib_accessor_get_attribute(a, attr->name, &id) != NULL) { + if (grib_accessor_get_attribute_index(a, attr->name, &id) != NULL) { grib_accessor_delete(a->context, a->attributes[id]); a->attributes[id] = attr; attr->parent_as_attribute = a; if (a->same) - attr->same = ecc__grib_accessor_get_attribute(a->same, attr->name, &idx); + attr->same = grib_accessor_get_attribute_index(a->same, attr->name, &idx); } else { grib_accessor_add_attribute(a, attr, 0); @@ -747,7 +747,7 @@ int grib_accessor_replace_attribute(grib_accessor* a, grib_accessor* attr) int grib_accessor_delete_attribute(grib_accessor* a, const char* name) { int id = 0; - if (ecc__grib_accessor_get_attribute(a, name, &id) != NULL) { + if (grib_accessor_get_attribute_index(a, name, &id) != NULL) { grib_accessor_delete(a->context, a->attributes[id]); a->attributes[id] = NULL; return GRIB_SUCCESS; @@ -770,7 +770,7 @@ const char* grib_accessor_get_name(grib_accessor* a) return a->name; } -grib_accessor* ecc__grib_accessor_get_attribute(grib_accessor* a, const char* name, int* index) +grib_accessor* grib_accessor_get_attribute_index(grib_accessor* a, const char* name, int* index) { int i = 0; while (i < MAX_ACCESSOR_ATTRIBUTES && a->attributes[i]) { @@ -799,14 +799,14 @@ grib_accessor* grib_accessor_get_attribute(grib_accessor* a, const char* name) while (*(p + 1) != '\0' && (*p != '-' || *(p + 1) != '>')) p++; if (*(p + 1) == '\0') { - return ecc__grib_accessor_get_attribute(a, name, &index); + return grib_accessor_get_attribute_index(a, name, &index); } else { size_t size = p - name; attribute_name = p + 2; basename = (char*)grib_context_malloc_clear(a->context, size + 1); basename = (char*)memcpy(basename, name, size); - acc = ecc__grib_accessor_get_attribute(a, basename, &index); + acc = grib_accessor_get_attribute_index(a, basename, &index); grib_context_free(a->context, basename); if (acc) return grib_accessor_get_attribute(acc, attribute_name); diff --git a/src/grib_accessor_class.cc b/src/grib_accessor_class.cc index 9de104328..9cdd04b97 100644 --- a/src/grib_accessor_class.cc +++ b/src/grib_accessor_class.cc @@ -226,7 +226,7 @@ static void link_same_attributes(grib_accessor* a, grib_accessor* b) if (!grib_accessor_has_attributes(b)) return; while (i < MAX_ACCESSOR_ATTRIBUTES && a->attributes[i]) { - bAttribute = ecc__grib_accessor_get_attribute(b, a->attributes[i]->name, &idx); + bAttribute = grib_accessor_get_attribute_index(b, a->attributes[i]->name, &idx); if (bAttribute) a->attributes[i]->same = bAttribute; i++; diff --git a/src/grib_dependency.cc b/src/grib_dependency.cc index 769ec49ce..4c417173e 100644 --- a/src/grib_dependency.cc +++ b/src/grib_dependency.cc @@ -134,7 +134,7 @@ int grib_dependency_notify_change(grib_accessor* observed) /* This version takes in the handle so does not need to work it out from the 'observed' */ /* See ECC-778 */ -int ecc__grib_dependency_notify_change(grib_handle* h, grib_accessor* observed) +int grib_dependency_notify_change_h(grib_handle* h, grib_accessor* observed) { grib_dependency* d = h->dependencies; int ret = GRIB_SUCCESS; diff --git a/src/grib_value.cc b/src/grib_value.cc index d3542a02a..1320bc9b7 100644 --- a/src/grib_value.cc +++ b/src/grib_value.cc @@ -701,7 +701,7 @@ static int _grib_set_double_array_internal(grib_handle* h, grib_accessor* a, *encoded_length += len; if (err == GRIB_SUCCESS) { /* See ECC-778 */ - return ecc__grib_dependency_notify_change(h, a); + return grib_dependency_notify_change_h(h, a); } } else { @@ -739,7 +739,7 @@ static int _grib_set_double_array(grib_handle* h, const char* name, err = GRIB_ARRAY_TOO_SMALL; if (err == GRIB_SUCCESS) - return ecc__grib_dependency_notify_change(h, a); /* See ECC-778 */ + return grib_dependency_notify_change_h(h, a); /* See ECC-778 */ return err; }