diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-05-29 15:07:55 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-05-29 15:07:55 (GMT) |
commit | e69e970a1c71621c39a5f5fa656a185948ed1df8 (patch) | |
tree | 6d62761aa80d47e1713786bdeadabed02cc3c8f0 /src/H5Ofill.c | |
parent | 0ba943194ec2c8b74bbfd6531ee7a9b110803974 (diff) | |
download | hdf5-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/H5Ofill.c')
-rw-r--r-- | src/H5Ofill.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/src/H5Ofill.c b/src/H5Ofill.c index b50e2da..77523e0 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -98,7 +98,8 @@ H5O_fill_new_decode(H5F_t UNUSED *f, const uint8_t *p, int version; void *ret_value = NULL; - FUNC_ENTER(H5O_fill_new_decode, NULL); + FUNC_ENTER_NOAPI(H5O_fill_new_decode, NULL); + assert(f); assert(p); assert(!sh); @@ -170,7 +171,8 @@ H5O_fill_decode(H5F_t UNUSED *f, const uint8_t *p, H5O_fill_t *mesg=NULL; void *ret_value = NULL; - FUNC_ENTER(H5O_fill_decode, NULL); + FUNC_ENTER_NOAPI(H5O_fill_decode, NULL); + assert(f); assert(p); assert(!sh); @@ -221,7 +223,8 @@ H5O_fill_new_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg) { const H5O_fill_new_t *mesg = (const H5O_fill_new_t *)_mesg; - FUNC_ENTER(H5O_fill_new_encode, FAIL); + FUNC_ENTER_NOAPI(H5O_fill_new_encode, FAIL); + assert(f); assert(p); assert(mesg && NULL==mesg->type); @@ -266,7 +269,8 @@ H5O_fill_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg) { const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg; - FUNC_ENTER(H5O_fill_encode, FAIL); + FUNC_ENTER_NOAPI(H5O_fill_encode, FAIL); + assert(f); assert(p); assert(mesg && NULL==mesg->type); @@ -305,7 +309,8 @@ H5O_fill_new_copy(const void *_mesg, void *_dest) H5O_fill_new_t *dest = (H5O_fill_new_t *)_dest; void *ret_value = NULL; - FUNC_ENTER(H5O_fill_new_copy, NULL); + FUNC_ENTER_NOAPI(H5O_fill_new_copy, NULL); + assert(mesg); if (!dest && NULL==(dest=H5MM_calloc(sizeof(H5O_fill_new_t)))) { @@ -373,7 +378,8 @@ H5O_fill_copy(const void *_mesg, void *_dest) H5O_fill_t *dest = (H5O_fill_t *)_dest; void *ret_value = NULL; - FUNC_ENTER(H5O_fill_copy, NULL); + FUNC_ENTER_NOAPI(H5O_fill_copy, NULL); + assert(mesg); if (!dest && NULL==(dest=H5MM_calloc(sizeof(H5O_fill_t)))) { @@ -434,7 +440,8 @@ H5O_fill_new_size(H5F_t UNUSED *f, const void *_mesg) const H5O_fill_new_t *mesg = (const H5O_fill_new_t *)_mesg; size_t ret_value = 0; - FUNC_ENTER(H5O_fill_new_size, 0); + FUNC_ENTER_NOAPI(H5O_fill_new_size, 0); + assert(f); assert(mesg); @@ -471,7 +478,8 @@ H5O_fill_size(H5F_t UNUSED *f, const void *_mesg) { const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg; - FUNC_ENTER(H5O_fill_size, 0); + FUNC_ENTER_NOAPI(H5O_fill_size, 0); + assert(f); assert(mesg); @@ -500,7 +508,8 @@ H5O_fill_new_reset(void *_mesg) { H5O_fill_new_t *mesg = (H5O_fill_new_t *)_mesg; - FUNC_ENTER(H5O_fill_new_reset, FAIL); + FUNC_ENTER_NOAPI(H5O_fill_new_reset, FAIL); + assert(mesg); if(mesg->buf) @@ -536,7 +545,8 @@ H5O_fill_reset(void *_mesg) { H5O_fill_t *mesg = (H5O_fill_t *)_mesg; - FUNC_ENTER(H5O_fill_reset, FAIL); + FUNC_ENTER_NOAPI(H5O_fill_reset, FAIL); + assert(mesg); if(mesg->buf) @@ -571,7 +581,8 @@ H5O_fill_new_debug(H5F_t UNUSED *f, const void *_mesg, FILE *stream, { const H5O_fill_new_t *mesg = (const H5O_fill_new_t *)_mesg; - FUNC_ENTER(H5O_fill_new_debug, FAIL); + FUNC_ENTER_NOAPI(H5O_fill_new_debug, FAIL); + assert(f); assert(mesg); assert(stream); @@ -612,7 +623,8 @@ H5O_fill_debug(H5F_t UNUSED *f, const void *_mesg, FILE *stream, { const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg; - FUNC_ENTER(H5O_fill_debug, FAIL); + FUNC_ENTER_NOAPI(H5O_fill_debug, FAIL); + assert(f); assert(mesg); assert(stream); @@ -659,7 +671,8 @@ H5O_fill_convert(void *_fill, H5T_t *dset_type) hid_t src_id=-1, dst_id=-1; /*data type identifiers */ herr_t ret_value=FAIL; /*return value */ - FUNC_ENTER(H5O_fill_convert, FAIL); + FUNC_ENTER_NOAPI(H5O_fill_convert, FAIL); + assert(fill); assert(dset_type); |