diff options
Diffstat (limited to 'src/H5R.c')
-rw-r--r-- | src/H5R.c | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -87,15 +87,22 @@ H5R_init_interface(void) EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -void -H5R_term_interface(intn status) +intn +H5R_term_interface(void) { - if (interface_initialize_g>0) { - /* Free ID group */ - H5I_destroy_group(H5I_REFERENCE); + intn n=0; + + if (interface_initialize_g) { + if ((n=H5I_nmembers(H5I_REFERENCE))) { + H5I_clear_group(H5I_REFERENCE); + } else { + H5I_destroy_group(H5I_REFERENCE); + interface_initialize_g = 0; + n = 1; /*H5I*/ + } } - interface_initialize_g = status; + return n; } |