summaryrefslogtreecommitdiffstats
path: root/src/H5M.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5M.c')
-rw-r--r--src/H5M.c64
1 files changed, 9 insertions, 55 deletions
diff --git a/src/H5M.c b/src/H5M.c
index 845c054..59ce615 100644
--- a/src/H5M.c
+++ b/src/H5M.c
@@ -58,9 +58,6 @@ static herr_t H5M__get_api_common(hid_t map_id, hid_t key_mem_type_id, const voi
/* Package Variables */
/*********************/
-/* Package initialization variable */
-hbool_t H5_PKG_INIT_VAR = FALSE;
-
/*****************************/
/* Library Private Variables */
/*****************************/
@@ -77,9 +74,6 @@ static const H5I_class_t H5I_MAP_CLS[1] = {{
(H5I_free_t)H5M__close_cb /* Callback routine for closing objects of this class */
}};
-/* Flag indicating "top" of interface has been initialized */
-static hbool_t H5M_top_package_initialize_s = FALSE;
-
/*-------------------------------------------------------------------------
* Function: H5M_init
*
@@ -96,41 +90,14 @@ H5M_init(void)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /* FUNC_ENTER() does all the work */
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5M_init() */
-
-/*-------------------------------------------------------------------------
-NAME
- H5M__init_package -- Initialize interface-specific information
-USAGE
- herr_t H5M__init_package()
-
-RETURNS
- Non-negative on success/Negative on failure
-DESCRIPTION
- Initializes any interface-specific data or routines.
----------------------------------------------------------------------------
-*/
-herr_t
-H5M__init_package(void)
-{
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_PACKAGE
/* Initialize the ID group for the map IDs */
if (H5I_register_type(H5I_MAP_CLS) < 0)
HGOTO_ERROR(H5E_MAP, H5E_CANTINIT, FAIL, "unable to initialize interface")
- /* Mark "top" of interface as initialized, too */
- H5M_top_package_initialize_s = TRUE;
-
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5M__init_package() */
+} /* end H5M_init() */
/*-------------------------------------------------------------------------
* Function: H5M_top_term_package
@@ -149,16 +116,10 @@ H5M_top_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if (H5M_top_package_initialize_s) {
- if (H5I_nmembers(H5I_MAP) > 0) {
- (void)H5I_clear_type(H5I_MAP, FALSE, FALSE);
- n++; /*H5I*/
- } /* end if */
-
- /* Mark closed */
- if (0 == n)
- H5M_top_package_initialize_s = FALSE;
- } /* end if */
+ if (H5I_nmembers(H5I_MAP) > 0) {
+ (void)H5I_clear_type(H5I_MAP, FALSE, FALSE);
+ n++;
+ }
FUNC_LEAVE_NOAPI(n)
} /* end H5M_top_term_package() */
@@ -183,18 +144,11 @@ H5M_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if (H5_PKG_INIT_VAR) {
- /* Sanity checks */
- HDassert(0 == H5I_nmembers(H5I_MAP));
- HDassert(FALSE == H5M_top_package_initialize_s);
+ /* Sanity checks */
+ HDassert(0 == H5I_nmembers(H5I_MAP));
- /* Destroy the dataset object id group */
- n += (H5I_dec_type_ref(H5I_MAP) > 0);
-
- /* Mark closed */
- if (0 == n)
- H5_PKG_INIT_VAR = FALSE;
- } /* end if */
+ /* Destroy the dataset object id group */
+ n += (H5I_dec_type_ref(H5I_MAP) > 0);
FUNC_LEAVE_NOAPI(n)
} /* end H5M_term_package() */