diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-04-06 03:40:06 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-04-06 03:40:06 (GMT) |
commit | 847be78dbec1116c5b9be6207dba5253b75da323 (patch) | |
tree | e3ab03849bcb1bf76db4628e7c93bf7cd93464c6 /src/H5Gname.c | |
parent | f0d1a03aa18843b8260c234cd535978a2145941e (diff) | |
download | hdf5-847be78dbec1116c5b9be6207dba5253b75da323.zip hdf5-847be78dbec1116c5b9be6207dba5253b75da323.tar.gz hdf5-847be78dbec1116c5b9be6207dba5253b75da323.tar.bz2 |
Brings H5RS changes from develop
Diffstat (limited to 'src/H5Gname.c')
-rw-r--r-- | src/H5Gname.c | 282 |
1 files changed, 89 insertions, 193 deletions
diff --git a/src/H5Gname.c b/src/H5Gname.c index 8020d86..fd63cbb 100644 --- a/src/H5Gname.c +++ b/src/H5Gname.c @@ -77,22 +77,16 @@ typedef struct H5G_gnba_iter_t { /* Local Prototypes */ /********************/ -static htri_t H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r); -static H5RS_str_t *H5G_build_fullpath(const char *prefix, const char *name); -#ifdef NOT_YET -static H5RS_str_t *H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *name_r); -#endif /* NOT_YET */ -static herr_t H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char *src_path, - const char *dst_path); -static int H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key); +static htri_t H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r); +static H5RS_str_t *H5G__build_fullpath(const char *prefix, const char *name); +static herr_t H5G__name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char *src_path, + const char *dst_path); +static int H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key); /*********************/ /* Package Variables */ /*********************/ -/* Declare extern the PQ free list for the wrapped strings */ -H5FL_BLK_EXTERN(str_buf); - /*****************************/ /* Library Private Variables */ /*****************************/ @@ -197,7 +191,7 @@ done: } /* end H5G_normalize() */ /*------------------------------------------------------------------------- - * Function: H5G_common_path + * Function: H5G__common_path * * Purpose: Determine if one path is a valid prefix of another path * @@ -211,14 +205,14 @@ done: *------------------------------------------------------------------------- */ static htri_t -H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r) +H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r) { const char *fullpath; /* Pointer to actual fullpath string */ const char *prefix; /* Pointer to actual prefix string */ size_t nchars1, nchars2; /* Number of characters in components */ htri_t ret_value = FALSE; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* Get component of each name */ fullpath = H5RS_get_str(fullpath_r); @@ -259,10 +253,10 @@ H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_common_path() */ +} /* end H5G__common_path() */ /*------------------------------------------------------------------------- - * Function: H5G_build_fullpath + * Function: H5G__build_fullpath * * Purpose: Build a full path from a prefix & base pair of strings * @@ -275,51 +269,26 @@ done: *------------------------------------------------------------------------- */ static H5RS_str_t * -H5G_build_fullpath(const char *prefix, const char *name) +H5G__build_fullpath(const char *prefix, const char *name) { - char * full_path; /* Full user path built */ - size_t orig_path_len; /* Original length of the path */ - size_t path_len; /* Length of the path */ - size_t name_len; /* Length of the name */ - unsigned need_sep; /* Flag to indicate if separator is needed */ H5RS_str_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Sanity check */ HDassert(prefix); HDassert(name); - /* Get the length of the prefix */ - orig_path_len = path_len = HDstrlen(prefix); - - /* Determine if there is a trailing separator in the name */ - if (prefix[path_len - 1] == '/') - need_sep = 0; - else - need_sep = 1; - - /* Add in the length needed for the '/' separator and the relative path */ - name_len = HDstrlen(name); - path_len += name_len + need_sep; - - /* Allocate space for the path */ - if (NULL == (full_path = (char *)H5FL_BLK_MALLOC(str_buf, path_len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - - /* Build full path */ - HDstrncpy(full_path, prefix, orig_path_len + 1); - if (need_sep) - HDstrncat(full_path, "/", (size_t)1); - HDstrncat(full_path, name, name_len); - - /* Create reference counted string for path */ - if (NULL == (ret_value = H5RS_own(full_path))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + /* Create full path */ + if (NULL == (ret_value = H5RS_create(prefix))) + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, NULL, "can't create ref-counted string") + if (prefix[HDstrlen(prefix) - 1] != '/') + H5RS_aputc(ret_value, '/'); /* Add separator, if the prefix doesn't end in one */ + H5RS_acat(ret_value, name); done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_build_fullpath() */ +} /* end H5G__build_fullpath() */ /*------------------------------------------------------------------------- * Function: H5G_build_fullpath_refstr_str @@ -350,49 +319,11 @@ H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name) HDassert(prefix); /* Create reference counted string for path */ - ret_value = H5G_build_fullpath(prefix, name); + ret_value = H5G__build_fullpath(prefix, name); FUNC_LEAVE_NOAPI(ret_value) } /* end H5G_build_fullpath_refstr_str() */ -#ifdef NOT_YET - -/*------------------------------------------------------------------------- - * Function: H5G_name_build_refstr_refstr - * - * Purpose: Build a full path from a prefix & base pair of reference counted - * strings - * - * Return: Pointer to reference counted string on success, NULL on error - * - * Programmer: Quincey Koziol - * - * Date: August 19, 2005 - * - *------------------------------------------------------------------------- - */ -static H5RS_str_t * -H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *name_r) -{ - const char *prefix; /* Pointer to raw string of prefix */ - const char *name; /* Pointer to raw string of name */ - H5RS_str_t *ret_value; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT_NOERR - - /* Get the pointer to the prefix */ - prefix = H5RS_get_str(prefix_r); - - /* Get the pointer to the raw src user path */ - name = H5RS_get_str(name_r); - - /* Create reference counted string for path */ - ret_value = H5G_build_fullpath(prefix, name); - - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_build_fullpath_refstr_refstr() */ -#endif /* NOT_YET */ - /*------------------------------------------------------------------------- * Function: H5G__name_init * @@ -643,7 +574,7 @@ H5G_name_free(H5G_name_t *name) } /* end H5G_name_free() */ /*------------------------------------------------------------------------- - * Function: H5G_name_move_path + * Function: H5G__name_move_path * * Purpose: Update a user or canonical path after an object moves * @@ -656,15 +587,15 @@ H5G_name_free(H5G_name_t *name) *------------------------------------------------------------------------- */ static herr_t -H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char *src_path, - const char *dst_path) +H5G__name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char *src_path, + const char *dst_path) { const char *path; /* Path to update */ size_t path_len; /* Length of path */ size_t full_suffix_len; /* Length of full suffix */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(path_r_ptr && *path_r_ptr); @@ -681,27 +612,23 @@ H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char path_len = HDstrlen(path); if (full_suffix_len < path_len) { const char *dst_suffix; /* Destination suffix that changes */ - size_t dst_suffix_len; /* Length of destination suffix */ const char *src_suffix; /* Source suffix that changes */ size_t path_prefix_len; /* Length of path prefix */ const char *path_prefix2; /* 2nd prefix for path */ size_t path_prefix2_len; /* Length of 2nd path prefix */ - const char *common_prefix; /* Common prefix for src & dst paths */ size_t common_prefix_len; /* Length of common prefix */ - char * new_path; /* Pointer to new path */ - size_t new_path_len; /* Length of new path */ + H5RS_str_t *rs; /* Ref-counted string for new path */ - /* Compute path prefix before full suffix*/ + /* Compute path prefix before full suffix */ path_prefix_len = path_len - full_suffix_len; /* Determine the common prefix for src & dst paths */ - common_prefix = src_path; common_prefix_len = 0; /* Find first character that is different */ while (*(src_path + common_prefix_len) == *(dst_path + common_prefix_len)) common_prefix_len++; /* Back up to previous '/' */ - while (*(common_prefix + common_prefix_len) != '/') + while (*(src_path + common_prefix_len) != '/') common_prefix_len--; /* Include '/' */ common_prefix_len++; @@ -710,41 +637,36 @@ H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char src_suffix = src_path + (common_prefix_len - 1); /* Determine destination suffix */ - dst_suffix = dst_path + (common_prefix_len - 1); - dst_suffix_len = HDstrlen(dst_suffix); + dst_suffix = dst_path + (common_prefix_len - 1); - /* Compute path prefix before src suffix*/ + /* Compute path prefix before src suffix */ path_prefix2 = path; path_prefix2_len = path_prefix_len - HDstrlen(src_suffix); - /* Allocate space for the new path */ - new_path_len = path_prefix2_len + dst_suffix_len + full_suffix_len; - if (NULL == (new_path = (char *)H5FL_BLK_MALLOC(str_buf, new_path_len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + /* Allocate new ref-counted string */ + if (NULL == (rs = H5RS_create(NULL))) + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string") /* Create the new path */ - if (path_prefix2_len > 0) { - HDstrncpy(new_path, path_prefix2, path_prefix2_len + 1); - HDstrncpy(new_path + path_prefix2_len, dst_suffix, dst_suffix_len + 1); - } /* end if */ - else - HDstrncpy(new_path, dst_suffix, dst_suffix_len + 1); + if (path_prefix2_len > 0) + H5RS_ancat(rs, path_prefix2, path_prefix2_len); + H5RS_acat(rs, dst_suffix); if (full_suffix_len > 0) - HDstrncat(new_path, full_suffix, full_suffix_len); + H5RS_acat(rs, full_suffix); /* Release previous path */ H5RS_decr(*path_r_ptr); /* Take ownership of the new full path */ - *path_r_ptr = H5RS_own(new_path); + *path_r_ptr = rs; } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_name_move_path() */ +} /* end H5G__name_move_path() */ /*------------------------------------------------------------------------- - * Function: H5G_name_replace_cb + * Function: H5G__name_replace_cb * * Purpose: H5I_iterate callback function to replace group entry names * @@ -757,7 +679,7 @@ done: *------------------------------------------------------------------------- */ static int -H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) +H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) { const H5G_names_t *names = (const H5G_names_t *)key; /* Get operation's information */ H5O_loc_t * oloc; /* Object location for object that the ID refers to */ @@ -766,7 +688,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) hbool_t obj_in_child = FALSE; /* Flag to indicate that the object is in the child mount hier. */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC HDassert(obj_ptr); @@ -853,39 +775,30 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) case H5G_NAME_MOUNT: /* Check if object is in child mount hier. */ if (obj_in_child) { - const char *full_path; /* Full path of current object */ - const char *src_path; /* Full path of source object */ - size_t src_path_len; /* Length of source full path */ - char * new_full_path; /* New full path of object */ - size_t new_full_len; /* Length of new full path */ + const char *full_path; /* Full path of current object */ + const char *src_path; /* Full path of source object */ + H5RS_str_t *rs; /* Ref-counted string for new path */ /* Get pointers to paths of interest */ - full_path = H5RS_get_str(obj_path->full_path_r); - src_path = H5RS_get_str(names->src_full_path_r); - src_path_len = HDstrlen(src_path); - - /* Build new full path */ - - /* Allocate space for the new full path */ - new_full_len = src_path_len + HDstrlen(full_path); - if (NULL == (new_full_path = (char *)H5FL_BLK_MALLOC(str_buf, new_full_len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + full_path = H5RS_get_str(obj_path->full_path_r); + src_path = H5RS_get_str(names->src_full_path_r); - /* Create the new full path */ - HDstrncpy(new_full_path, src_path, src_path_len + 1); - HDstrncat(new_full_path, full_path, new_full_len); + /* Create new full path */ + if (NULL == (rs = H5RS_create(src_path))) + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string") + H5RS_acat(rs, full_path); /* Release previous full path */ H5RS_decr(obj_path->full_path_r); /* Take ownership of the new full path */ - obj_path->full_path_r = H5RS_own(new_full_path); + obj_path->full_path_r = rs; } /* end if */ /* Object must be in parent mount file hier. */ else { /* Check if the source is along the entry's path */ /* (But not actually the entry itself) */ - if (H5G_common_path(obj_path->full_path_r, names->src_full_path_r) && + if (H5G__common_path(obj_path->full_path_r, names->src_full_path_r) && H5RS_cmp(obj_path->full_path_r, names->src_full_path_r)) { /* Hide the user path */ (obj_path->obj_hidden)++; @@ -899,36 +812,30 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) */ case H5G_NAME_UNMOUNT: if (obj_in_child) { - const char *full_path; /* Full path of current object */ - const char *full_suffix; /* Full path after source path */ - size_t full_suffix_len; /* Length of full path after source path */ - const char *src_path; /* Full path of source object */ - char * new_full_path; /* New full path of object */ + const char *full_path; /* Full path of current object */ + const char *full_suffix; /* Full path after source path */ + const char *src_path; /* Full path of source object */ + H5RS_str_t *rs; /* Ref-counted string for new path */ /* Get pointers to paths of interest */ full_path = H5RS_get_str(obj_path->full_path_r); src_path = H5RS_get_str(names->src_full_path_r); /* Construct full path suffix */ - full_suffix = full_path + HDstrlen(src_path); - full_suffix_len = HDstrlen(full_suffix); + full_suffix = full_path + HDstrlen(src_path); - /* Build new full path */ - - /* Create the new full path */ - if (NULL == (new_full_path = (char *)H5FL_BLK_MALLOC(str_buf, full_suffix_len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") - HDstrncpy(new_full_path, full_suffix, full_suffix_len + 1); + /* Create new full path suffix */ + if (NULL == (rs = H5RS_create(full_suffix))) + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string") /* Release previous full path */ H5RS_decr(obj_path->full_path_r); /* Take ownership of the new full path */ - obj_path->full_path_r = H5RS_own(new_full_path); + obj_path->full_path_r = rs; /* Check if the object's user path should be invalidated */ - if (obj_path->user_path_r && - HDstrlen(new_full_path) < (size_t)H5RS_len(obj_path->user_path_r)) { + if (obj_path->user_path_r && H5RS_len(rs) < H5RS_len(obj_path->user_path_r)) { /* Free user path */ H5RS_decr(obj_path->user_path_r); obj_path->user_path_r = NULL; @@ -936,7 +843,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) } /* end if */ else { /* Check if file being unmounted was hiding the object */ - if (H5G_common_path(obj_path->full_path_r, names->src_full_path_r) && + if (H5G__common_path(obj_path->full_path_r, names->src_full_path_r) && H5RS_cmp(obj_path->full_path_r, names->src_full_path_r)) { /* Un-hide the user path */ (obj_path->obj_hidden)--; @@ -950,7 +857,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) */ case H5G_NAME_DELETE: /* Check if the location being unlinked is in the path for the current object */ - if (H5G_common_path(obj_path->full_path_r, names->src_full_path_r)) { + if (H5G__common_path(obj_path->full_path_r, names->src_full_path_r)) { /* Free paths for object */ H5G_name_free(obj_path); } /* end if */ @@ -962,54 +869,43 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) */ case H5G_NAME_MOVE: /* Link move case, check for relative names case */ /* Check if the src object moved is in the current object's path */ - if (H5G_common_path(obj_path->full_path_r, names->src_full_path_r)) { - const char *full_path; /* Full path of current object */ - const char *full_suffix; /* Suffix of full path, after src_path */ - size_t full_suffix_len; /* Length of suffix of full path after src_path*/ - char * new_full_path; /* New full path of object */ - size_t new_full_len; /* Length of new full path */ - const char *src_path; /* Full path of source object */ - const char *dst_path; /* Full path of destination object */ - size_t dst_path_len; /* Length of destination's full path */ + if (H5G__common_path(obj_path->full_path_r, names->src_full_path_r)) { + const char *full_path; /* Full path of current object */ + const char *full_suffix; /* Suffix of full path, after src_path */ + const char *src_path; /* Full path of source object */ + const char *dst_path; /* Full path of destination object */ + H5RS_str_t *rs; /* Ref-counted string for new path */ /* Sanity check */ HDassert(names->dst_full_path_r); /* Get pointers to paths of interest */ - full_path = H5RS_get_str(obj_path->full_path_r); - src_path = H5RS_get_str(names->src_full_path_r); - dst_path = H5RS_get_str(names->dst_full_path_r); - dst_path_len = HDstrlen(dst_path); + full_path = H5RS_get_str(obj_path->full_path_r); + src_path = H5RS_get_str(names->src_full_path_r); + dst_path = H5RS_get_str(names->dst_full_path_r); /* Make certain that the source and destination names are full (not relative) paths */ HDassert(*src_path == '/'); HDassert(*dst_path == '/'); /* Get pointer to "full suffix" */ - full_suffix = full_path + HDstrlen(src_path); - full_suffix_len = HDstrlen(full_suffix); + full_suffix = full_path + HDstrlen(src_path); /* Update the user path, if one exists */ if (obj_path->user_path_r) - if (H5G_name_move_path(&(obj_path->user_path_r), full_suffix, src_path, dst_path) < 0) + if (H5G__name_move_path(&(obj_path->user_path_r), full_suffix, src_path, dst_path) < 0) HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name") - /* Build new full path */ - - /* Allocate space for the new full path */ - new_full_len = dst_path_len + full_suffix_len; - if (NULL == (new_full_path = (char *)H5FL_BLK_MALLOC(str_buf, new_full_len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") - - /* Create the new full path */ - HDstrncpy(new_full_path, dst_path, dst_path_len + 1); - HDstrncat(new_full_path, full_suffix, full_suffix_len); + /* Create new full path */ + if (NULL == (rs = H5RS_create(dst_path))) + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string") + H5RS_acat(rs, full_suffix); /* Release previous full path */ H5RS_decr(obj_path->full_path_r); /* Take ownership of the new full path */ - obj_path->full_path_r = H5RS_own(new_full_path); + obj_path->full_path_r = rs; } /* end if */ break; @@ -1019,7 +915,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) done: FUNC_LEAVE_NOAPI(ret_value); -} /* end H5G_name_replace_cb() */ +} /* end H5G__name_replace_cb() */ /*------------------------------------------------------------------------- * Function: H5G_name_replace @@ -1144,17 +1040,17 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS /* Search through group IDs */ if (search_group) - if (H5I_iterate(H5I_GROUP, H5G_name_replace_cb, &names, FALSE) < 0) + if (H5I_iterate(H5I_GROUP, H5G__name_replace_cb, &names, FALSE) < 0) HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over groups") /* Search through dataset IDs */ if (search_dataset) - if (H5I_iterate(H5I_DATASET, H5G_name_replace_cb, &names, FALSE) < 0) + if (H5I_iterate(H5I_DATASET, H5G__name_replace_cb, &names, FALSE) < 0) HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datasets") /* Search through datatype IDs */ if (search_datatype) - if (H5I_iterate(H5I_DATATYPE, H5G_name_replace_cb, &names, FALSE) < 0) + if (H5I_iterate(H5I_DATATYPE, H5G__name_replace_cb, &names, FALSE) < 0) HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datatypes") } /* end if */ } /* end if */ @@ -1164,7 +1060,7 @@ done: } /* end H5G_name_replace() */ /*------------------------------------------------------------------------- - * Function: H5G_get_name_by_addr_cb + * Function: H5G__get_name_by_addr_cb * * Purpose: Callback for retrieving object's name by address * @@ -1178,7 +1074,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo, void *_udata) +H5G__get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo, void *_udata) { H5G_gnba_iter_t *udata = (H5G_gnba_iter_t *)_udata; /* User data for iteration */ H5G_loc_t obj_loc; /* Location of object */ @@ -1187,7 +1083,7 @@ H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo, v hbool_t obj_found = FALSE; /* Object at 'path' found */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Sanity check */ HDassert(path); @@ -1237,7 +1133,7 @@ done: HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, H5_ITER_ERROR, "can't free location") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_get_name_by_addr_cb() */ +} /* end H5G__get_name_by_addr_cb() */ /*------------------------------------------------------------------------- * Function: H5G_get_name_by_addr @@ -1285,7 +1181,7 @@ H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size) udata.path = NULL; /* Visit all the links in the file */ - if ((status = H5G_visit(&root_loc, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5G_get_name_by_addr_cb, + if ((status = H5G_visit(&root_loc, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5G__get_name_by_addr_cb, &udata)) < 0) HGOTO_ERROR(H5E_SYM, H5E_BADITER, (-1), "group traversal failed while looking for object name") else if (status > 0) |