summaryrefslogtreecommitdiffstats
path: root/src/H5Oname.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-06-23 15:36:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-06-23 15:36:35 (GMT)
commit7c3df64cc4742c0316ca81aeef67bd95a5737c70 (patch)
treef6aa023c661a881b2495ea0be4e745b43eea091f /src/H5Oname.c
parent19644d75931aaa79951830d85eda28de08f17180 (diff)
downloadhdf5-7c3df64cc4742c0316ca81aeef67bd95a5737c70.zip
hdf5-7c3df64cc4742c0316ca81aeef67bd95a5737c70.tar.gz
hdf5-7c3df64cc4742c0316ca81aeef67bd95a5737c70.tar.bz2
[svn-r8731] Purpose:
Code cleanup & minor optimization Description: Re-work the way interface initialization routines are specified in the library to avoid the overhead of checking for them in routines where there is no interface initialization routine. This cleans up warnings with gcc 3.4, reduces the library binary size a bit (about 2-3%) and should speedup the library's execution slightly. Platforms tested: FreeBSD 4.10 (sleipnir) w/gcc34 h5committest
Diffstat (limited to 'src/H5Oname.c')
-rw-r--r--src/H5Oname.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 231a177..0f1893d 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -61,10 +61,6 @@ const H5O_class_t H5O_NAME[1] = {{
H5O_name_debug, /*debug the message */
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*-------------------------------------------------------------------------
* Function: H5O_name_decode
@@ -91,7 +87,7 @@ H5O_name_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p,
H5O_name_t *mesg;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_name_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_name_decode);
/* check args */
assert(f);
@@ -136,9 +132,8 @@ static herr_t
H5O_name_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
{
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_name_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_encode);
/* check args */
assert(f);
@@ -148,8 +143,7 @@ H5O_name_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
/* encode */
HDstrcpy((char*)p, mesg->s);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -178,7 +172,7 @@ H5O_name_copy(const void *_mesg, void *_dest)
H5O_name_t *dest = (H5O_name_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_name_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_name_copy);
/* check args */
assert(mesg);
@@ -224,7 +218,7 @@ H5O_name_size(H5F_t UNUSED *f, const void *_mesg)
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI(H5O_name_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_size);
/* check args */
assert(f);
@@ -232,7 +226,6 @@ H5O_name_size(H5F_t UNUSED *f, const void *_mesg)
ret_value = mesg->s ? HDstrlen(mesg->s) + 1 : 0;
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -257,9 +250,8 @@ static herr_t
H5O_name_reset(void *_mesg)
{
H5O_name_t *mesg = (H5O_name_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_name_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_reset);
/* check args */
assert(mesg);
@@ -267,8 +259,7 @@ H5O_name_reset(void *_mesg)
/* reset */
mesg->s = H5MM_xfree(mesg->s);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -292,9 +283,8 @@ H5O_name_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *s
int indent, int fwidth)
{
const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_name_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_debug);
/* check args */
assert(f);
@@ -307,6 +297,5 @@ H5O_name_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *s
"Name:",
mesg->s);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}