src/h5core/{h5_file.c,h5_init.c,private/h5_init.h}
- refactor 'h5_initialize()' and 'h5_finalize()'
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user