summaryrefslogtreecommitdiffstats
path: root/src/H5Gent.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-05-29 15:07:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-05-29 15:07:55 (GMT)
commite69e970a1c71621c39a5f5fa656a185948ed1df8 (patch)
tree6d62761aa80d47e1713786bdeadabed02cc3c8f0 /src/H5Gent.c
parent0ba943194ec2c8b74bbfd6531ee7a9b110803974 (diff)
downloadhdf5-e69e970a1c71621c39a5f5fa656a185948ed1df8.zip
hdf5-e69e970a1c71621c39a5f5fa656a185948ed1df8.tar.gz
hdf5-e69e970a1c71621c39a5f5fa656a185948ed1df8.tar.bz2
[svn-r5471] Purpose:
Code cleanup Description: Broke the FUNC_ENTER macro into several macros, with more specialized uses (which followup mail will describe). This was designed to move most/all of the checks which could be done at compile time to that point, instead of needlessly performing them (over & over :-) at run-time. This reduces the library's size (and thus staticly linked binaries) and has a minor speedup effect also. Platforms tested: IRIX64 6.5 (modi4) with parallel & FORTRAN enabled, and additional testing on FreeBSD and Solaris immediately after the checkin.
Diffstat (limited to 'src/H5Gent.c')
-rw-r--r--src/H5Gent.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/H5Gent.c b/src/H5Gent.c
index 565ae47..35fd0af 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -42,7 +42,8 @@ static int interface_initialize_g = 0;
H5G_cache_t *
H5G_ent_cache(H5G_entry_t *ent, H5G_type_t *cache_type)
{
- FUNC_ENTER(H5G_ent_cache, NULL);
+ FUNC_ENTER_NOAPI(H5G_ent_cache, NULL);
+
if (!ent) {
HRETURN_ERROR(H5E_SYM, H5E_BADVALUE, NULL, "no entry");
}
@@ -73,10 +74,13 @@ H5G_ent_cache(H5G_entry_t *ent, H5G_type_t *cache_type)
herr_t
H5G_ent_modified(H5G_entry_t *ent, H5G_type_t cache_type)
{
- FUNC_ENTER(H5G_ent_modified, FAIL);
+ FUNC_ENTER_NOAPI(H5G_ent_modified, FAIL);
+
assert(ent);
+
if (H5G_NO_CHANGE != ent->type) ent->type = cache_type;
ent->dirty = TRUE;
+
FUNC_LEAVE(SUCCEED);
}
@@ -107,7 +111,7 @@ H5G_ent_decode_vec(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, int n)
{
int i;
- FUNC_ENTER(H5G_ent_decode_vec, FAIL);
+ FUNC_ENTER_NOAPI(H5G_ent_decode_vec, FAIL);
/* check arguments */
assert(f);
@@ -153,7 +157,7 @@ H5G_ent_decode(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
const uint8_t *p_ret = *pp;
uint32_t tmp;
- FUNC_ENTER(H5G_ent_decode, FAIL);
+ FUNC_ENTER_NOAPI(H5G_ent_decode, FAIL);
/* check arguments */
assert(f);
@@ -219,7 +223,7 @@ H5G_ent_encode_vec(H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, int n)
{
int i;
- FUNC_ENTER(H5G_ent_encode_vec, FAIL);
+ FUNC_ENTER_NOAPI(H5G_ent_encode_vec, FAIL);
/* check arguments */
assert(f);
@@ -267,7 +271,7 @@ H5G_ent_encode(H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
{
uint8_t *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
- FUNC_ENTER(H5G_ent_encode, FAIL);
+ FUNC_ENTER_NOAPI(H5G_ent_encode, FAIL);
/* check arguments */
assert(f);
@@ -336,7 +340,7 @@ H5G_ent_debug(H5F_t UNUSED *f, const H5G_entry_t *ent, FILE * stream,
{
const char *lval = NULL;
- FUNC_ENTER(H5G_ent_debug, FAIL);
+ FUNC_ENTER_NOAPI(H5G_ent_debug, FAIL);
HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
"Name offset into private heap:",