diff --git a/src/h5core/h5_file.c b/src/h5core/h5_file.c index 2160111..2b70331 100644 --- a/src/h5core/h5_file.c +++ b/src/h5core/h5_file.c @@ -617,7 +617,7 @@ h5_close_h5hut ( void ) { H5_CORE_API_ENTER (h5_err_t, "%s", ""); - TRY (h5priv_finalize ()); + TRY (h5_finalize ()); TRY (hdf5_close ()); H5_RETURN (H5_SUCCESS); } diff --git a/src/h5core/h5_init.c b/src/h5core/h5_init.c index a7d8386..5684f4b 100644 --- a/src/h5core/h5_init.c +++ b/src/h5core/h5_init.c @@ -741,9 +741,10 @@ _h5_exit (int status) { } h5_err_t -h5priv_initialize ( +h5_initialize ( void ) { + if (h5_initialized) return 0; memset (&h5_call_stack, 0, sizeof (h5_call_stack)); // must be set here, otherwise next statement will fail! h5_initialized = 1; @@ -785,7 +786,7 @@ h5priv_initialize ( } h5_err_t -h5priv_finalize ( +h5_finalize ( void ) { H5_PRIV_FUNC_ENTER (h5_err_t, "%s", "void"); diff --git a/src/h5core/private/h5_init.h b/src/h5core/private/h5_init.h index 2403431..a58c0ec 100644 --- a/src/h5core/private/h5_init.h +++ b/src/h5core/private/h5_init.h @@ -20,10 +20,10 @@ extern "C" { #endif h5_err_t -h5priv_initialize (void); +h5_initialize (void); h5_err_t -h5priv_finalize (void); +h5_finalize (void); extern int h5_initialized; extern h5_dta_types_t h5_dta_types;