diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-11-27 17:54:04 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-11-27 17:54:04 (GMT) |
commit | 1729192d9e6172c419814084ae2c65194e293735 (patch) | |
tree | b85d98e0fbf87838b291cbd248624e46543535d9 /src | |
parent | b52107a42a19c26894d18f88cab801749c32c34f (diff) | |
download | hdf5-1729192d9e6172c419814084ae2c65194e293735.zip hdf5-1729192d9e6172c419814084ae2c65194e293735.tar.gz hdf5-1729192d9e6172c419814084ae2c65194e293735.tar.bz2 |
[svn-r9584] 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')
-rw-r--r-- | src/H5Ppublic.h | 4 | ||||
-rw-r--r-- | src/H5T.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 6df6d0a..e4e3c78 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -71,9 +71,9 @@ typedef herr_t (*H5P_iterate_t)(hid_t id, const char *name, void *iter_data); * */ -/* When this header is included from H5Pprivate.h, don't make calls to H5open() */ +/* When this header is included from a private header, don't make calls to H5open() */ #undef H5OPEN -#ifndef _H5Pprivate_H +#ifndef _H5private_H #define H5OPEN H5open(), #else /* _H5Pprivate_H */ #define H5OPEN @@ -3256,9 +3256,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; |