summaryrefslogtreecommitdiffstats
path: root/src/H5E.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/H5E.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/H5E.c')
-rw-r--r--src/H5E.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/H5E.c b/src/H5E.c
index 0862e89..5128aa8 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -40,6 +40,9 @@
*
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5E_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5E_mask
@@ -49,10 +52,6 @@
#include "H5Eprivate.h" /* Private error routines */
#include "H5MMprivate.h" /* Memory management */
-/* Interface initialization? */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5E_init_interface
-
/* HDF5 error class ID */
hid_t H5E_ERR_CLS_g = FAIL;
@@ -96,7 +95,6 @@ int H5E_mpi_error_str_len;
#endif
/* Static function declarations */
-static herr_t H5E_init_interface (void);
static H5E_cls_t *H5E_register_class(const char *cls_name, const char *lib_name,
const char *version);
static herr_t H5E_unregister_class(H5E_cls_t *cls);
@@ -203,7 +201,7 @@ H5E_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_term_interface)
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
/* Check if there are any open error stacks, classes or messages */
ncls = H5I_nmembers(H5I_ERROR_CLASS);
nmsg = H5I_nmembers(H5I_ERROR_MSG);
@@ -242,7 +240,7 @@ H5E_term_interface(void)
H5I_dec_type_ref(H5I_ERROR_MSG);
/* Mark closed */
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1; /*H5I*/
}
}