diff options
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -5406,6 +5406,9 @@ done: * Robb Matzke, 20 May 1999 * Now able to copy opaque types. * + * Pedro Vicente, <pvn@ncsa.uiuc.edu> 22 Aug 2002 + * Added a deep copy of the symbol table entry + * *------------------------------------------------------------------------- */ H5T_t * @@ -5425,9 +5428,14 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) if (NULL==(new_dt = H5FL_ALLOC(H5T_t,0))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); - /* Copy actual information */ + /* Copy actual information */ *new_dt = *old_dt; + /* Deep copy of the symbol table entry */ + if (H5G_ent_copy(&(old_dt->ent),&(new_dt->ent))<0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to copy entry"); + + /* Copy parent information */ if (new_dt->parent) new_dt->parent = H5T_copy(new_dt->parent, method); |