summaryrefslogtreecommitdiffstats
path: root/src/H5Oattr.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/H5Oattr.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/H5Oattr.c')
-rw-r--r--src/H5Oattr.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index f454b74..f816b2c 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -67,10 +67,6 @@ const H5O_class_t H5O_ATTR[1] = {{
/* Flags for attribute flag encoding */
#define H5O_ATTR_FLAG_TYPE_SHARED 0x01
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare external the free list for H5S_t's */
H5FL_EXTERN(H5S_t);
@@ -116,7 +112,7 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p, H5O_shared_t UNUSED *
unsigned flags=0; /* Attribute flags */
H5A_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_decode);
/* check args */
assert(f);
@@ -257,7 +253,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
hbool_t type_shared; /* Flag to indicate that a shared datatype is used for this attribute */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_encode);
/* check args */
assert(f);
@@ -373,7 +369,7 @@ H5O_attr_copy(const void *_src, void *_dst)
H5A_t *dst = NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_copy);
/* check args */
assert(src);
@@ -425,7 +421,7 @@ H5O_attr_size(H5F_t UNUSED *f, const void *_mesg)
hbool_t type_shared; /* Flag to indicate that a shared datatype is used for this attribute */
size_t ret_value = 0;
- FUNC_ENTER_NOAPI(H5O_attr_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_size);
assert(attr);
@@ -464,7 +460,6 @@ H5O_attr_size(H5F_t UNUSED *f, const void *_mesg)
attr->ds_size + /*data space */
attr->data_size; /*the data itself */
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -491,7 +486,7 @@ H5O_attr_reset(void *_mesg)
H5A_t *tmp = NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_reset);
if (attr) {
if (NULL==(tmp = H5MM_malloc(sizeof(H5A_t))))
@@ -526,7 +521,7 @@ H5O_attr_delete(H5F_t UNUSED *f, hid_t dxpl_id, const void *_mesg)
const H5A_t *attr = (const H5A_t *) _mesg;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_delete, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_delete);
/* check args */
assert(f);
@@ -565,7 +560,7 @@ H5O_attr_link(H5F_t UNUSED *f, hid_t dxpl_id, const void *_mesg)
const H5A_t *attr = (const H5A_t *) _mesg;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_link, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_link);
/* check args */
assert(f);
@@ -611,7 +606,7 @@ H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int in
herr_t (*debug)(H5F_t*, hid_t, const void*, FILE*, int, int)=NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_debug);
/* check args */
assert(f);