summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-05-28 18:17:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-05-28 18:17:12 (GMT)
commitca912c389e4e641cfbae6facced950ad05578d65 (patch)
tree6bd8604f6a587ee07013ad40daa3c0c7f4b31c26 /src/H5R.c
parent893cf5899c2b724aa438b66a275967b1f5ad0342 (diff)
downloadhdf5-ca912c389e4e641cfbae6facced950ad05578d65.zip
hdf5-ca912c389e4e641cfbae6facced950ad05578d65.tar.gz
hdf5-ca912c389e4e641cfbae6facced950ad05578d65.tar.bz2
[svn-r5467] Purpose:
Code cleanup. Description: Took Robb's recent ideas for improving the FUNC_ENTER/FUNC_LEAVE macros equivalents in the SAF library and adapted them to our library. I added an additional macro which is equivalent to FUNC_ENTER: FUNC_ENTER_NOINIT - Has the API tracing code, etc. from FUNC_ENTER but none of the library or interface initialization code. This is to be used _only_ for static functions and those which explicitly cannot have the library or interface initialization code enabled (like the API termination routines, etc.). This allowed many more of the functions in the library [but not all yet :-(] to be wrapped with FUNC_ENTER[_NOINIT]/FUNC_LEAVE pairs. It also reduced the size of the library and executables (by cutting out a bunch of code which was never executed), I'll e-mail the exact results when I've finished editing it. Platforms tested: IRIX64 6.5 (modi4)
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 3cbba0a..806703c 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -55,7 +55,7 @@ DESCRIPTION
static herr_t
H5R_init_interface(void)
{
- FUNC_ENTER(H5R_init_interface, FAIL);
+ FUNC_ENTER_NOINIT(H5R_init_interface);
/* Initialize the atom group for the file IDs */
if (H5I_init_group(H5I_REFERENCE, H5I_REFID_HASHSIZE, H5R_RESERVED_ATOMS,
@@ -89,6 +89,8 @@ int
H5R_term_interface(void)
{
int n=0;
+
+ FUNC_ENTER_NOINIT(H5R_term_interface);
if (interface_initialize_g) {
if ((n=H5I_nmembers(H5I_REFERENCE))) {
@@ -100,7 +102,7 @@ H5R_term_interface(void)
}
}
- return n;
+ FUNC_LEAVE(n);
}
@@ -137,7 +139,7 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type,
H5G_stat_t sb; /* Stat buffer for retrieving OID */
herr_t ret_value = FAIL;
- FUNC_ENTER(H5R_create, FAIL);
+ FUNC_ENTER_NOINIT(H5R_create);
assert(_ref);
assert(loc);
@@ -341,7 +343,7 @@ H5R_dereference(H5F_t *file, H5R_type_t ref_type, void *_ref)
int oid_type; /* type of object being dereferenced */
hid_t ret_value = FAIL;
- FUNC_ENTER(H5R_dereference, FAIL);
+ FUNC_ENTER_NOINIT(H5R_dereference);
assert(_ref);
assert(ref_type>H5R_BADTYPE || ref_type<H5R_MAXTYPE);
@@ -544,7 +546,7 @@ H5R_get_region(H5F_t *file, H5R_type_t UNUSED ref_type, void *_ref)
uint8_t *buf; /* Buffer to store serialized selection in */
H5S_t *ret_value = NULL;
- FUNC_ENTER(H5R_get_region, NULL);
+ FUNC_ENTER_NOINIT(H5R_get_region);
assert(_ref);
assert(ref_type==H5R_DATASET_REGION);
@@ -685,7 +687,7 @@ H5R_get_object_type(H5F_t *file, void *_ref)
uint8_t *p; /* Pointer to OID to store */
int ret_value = H5G_UNKNOWN;
- FUNC_ENTER(H5R_get_object_type, H5G_UNKNOWN);
+ FUNC_ENTER_NOINIT(H5R_get_object_type);
assert(ref);
assert(file);
@@ -791,7 +793,7 @@ H5R_get_obj_type(H5F_t *file, H5R_type_t ref_type, void *_ref)
uint8_t *p; /* Pointer to OID to store */
int ret_value = H5G_UNKNOWN;
- FUNC_ENTER(H5R_get_obj_type, H5G_UNKNOWN);
+ FUNC_ENTER_NOINIT(H5R_get_obj_type);
assert(file);
assert(_ref);