diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5G.c | 6 | ||||
-rw-r--r-- | src/H5T.c | 22 |
2 files changed, 21 insertions, 7 deletions
@@ -79,6 +79,7 @@ #define H5F_PACKAGE /*suppress error about including H5Fpkg */ + /* Packages needed by this file... */ #include "H5private.h" #include "H5Aprivate.h" @@ -1063,8 +1064,7 @@ H5G_namei(H5G_entry_t *loc_ent, const char *name, const char **rest/*out*/, int _nlinks = H5G_NLINKS; const char *s = NULL; herr_t ret_value=SUCCEED; - - + H5G_t *tmp_grp; const char *orig_name = name; unsigned int null_obj = obj_ent == NULL ? 1 : 0; @@ -1148,7 +1148,7 @@ H5G_namei(H5G_entry_t *loc_ent, const char *name, const char **rest/*out*/, /* Set flag if at least one component was found */ found_once =1; - if (H5G_stab_find(grp_ent, H5G_comp_g, /*&tmp_obj_ent*/ obj_ent/*out*/ )<0) { + if (H5G_stab_find(grp_ent, H5G_comp_g, obj_ent/*out*/ )<0) { /* * Component was not found in the current symbol table, possibly * because GRP_ENT isn't a symbol table. @@ -5360,8 +5360,8 @@ H5T_open_oid (H5G_entry_t *ent) /* Mark the type as named and open */ dt->state = H5T_STATE_OPEN; - dt->ent = *ent; - + dt->ent = *ent; + /* Set return value */ ret_value=dt; @@ -5406,6 +5406,8 @@ done: * Robb Matzke, 20 May 1999 * Now able to copy opaque types. * + * Pedro Vicente, <pvn@ncsa.uiuc.edu> 21 Sep 2002 + * Added a deep copy of the symbol table entry * *------------------------------------------------------------------------- */ @@ -5427,8 +5429,8 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy actual information */ - *new_dt = *old_dt; - + *new_dt = *old_dt; + /* Copy parent information */ if (new_dt->parent) new_dt->parent = H5T_copy(new_dt->parent, method); @@ -5574,6 +5576,11 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) break; } /* end switch */ + + /*deep copy of the symbol table entry*/ + if (H5G_ent_copy(&(old_dt->ent),&(new_dt->ent))<0) + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to copy entry"); + /* Set return value */ ret_value=new_dt; @@ -5718,6 +5725,10 @@ done: * * Robb Matzke, 1999-05-20 * Closes opaque types also. + * + * Pedro Vicente, <pvn@ncsa.uiuc.edu> 22 Aug 2002 + * Added "ID to name" support + * *------------------------------------------------------------------------- */ herr_t @@ -5772,6 +5783,9 @@ H5T_close(H5T_t *dt) break; } + /*Free the ID to name buffer */ + H5G_free_ent_name(&(dt->ent)); + /* Free the datatype struct */ H5FL_FREE(H5T_t,dt); |