summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-11-27 16:32:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-11-27 16:32:37 (GMT)
commit19156dbd5d0053e18af5af6ffbca79900f1c9fe4 (patch)
treea17e6a218e855f7ef6429fb4c9b8f6c7c1b44ec0 /src/H5T.c
parentb2f85c54f3b95c76457242fa095b0375b86a9211 (diff)
downloadhdf5-19156dbd5d0053e18af5af6ffbca79900f1c9fe4.zip
hdf5-19156dbd5d0053e18af5af6ffbca79900f1c9fe4.tar.gz
hdf5-19156dbd5d0053e18af5af6ffbca79900f1c9fe4.tar.bz2
[svn-r9583] Purpose:
Code optimization Description: Revise mechanism for calling H5open/H5check to better avoid calling them from internal libray code. Only copy a datatype's group entry information if it has some. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel Solaris 2.7 (arabica) Too minor to require h5committest
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 905d89d..20eb663 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -3058,9 +3058,10 @@ 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(&(new_dt->ent), &(old_dt->ent),H5G_COPY_DEEP)<0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to copy entry");
+ /* Deep copy of the symbol table entry, if there was one */
+ if (H5F_addr_defined(old_dt->ent.header))
+ if (H5G_ent_copy(&(new_dt->ent), &(old_dt->ent), H5G_COPY_DEEP)<0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to copy entry");
/* Set return value */
ret_value=new_dt;