diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-07-31 21:31:36 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-07-31 21:31:36 (GMT) |
commit | a42ea0be91c25d90427678d548bcff17b032d2ca (patch) | |
tree | d00896d7f1bf6cc2b9696c30d675461ccf00149e /src/H5T.c | |
parent | 0cff4f0d146e6beafa4c6b6d4047e489719670f6 (diff) | |
parent | beb6f83cfd696e835970091f730a23db31381455 (diff) | |
download | hdf5-a42ea0be91c25d90427678d548bcff17b032d2ca.zip hdf5-a42ea0be91c25d90427678d548bcff17b032d2ca.tar.gz hdf5-a42ea0be91c25d90427678d548bcff17b032d2ca.tar.bz2 |
[svn-r25502] merge from trunk.
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -1438,20 +1438,23 @@ H5T_unlock_cb(void *_dt, hid_t UNUSED id, void UNUSED *key) int H5T_term_interface(void) { - int i, nprint=0, n=0; - H5T_path_t *path = NULL; + int n = 0; FUNC_ENTER_NOAPI_NOINIT_NOERR if(H5_interface_initialize_g) { + int i, nprint = 0; + /* Unregister all conversion functions */ for(i = 0; i < H5T_g.npaths; i++) { + H5T_path_t *path; + path = H5T_g.path[i]; HDassert(path); if(path->func) { H5T__print_stats(path, &nprint/*in,out*/); path->cdata.command = H5T_CONV_FREE; - if((path->func)(FAIL, FAIL, &(path->cdata), (size_t)0, + if((path->func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL,H5AC_dxpl_id) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { @@ -1488,7 +1491,9 @@ H5T_term_interface(void) /* Close deprecated interface */ n += H5T__term_deprec_interface(); - H5I_dec_type_ref(H5I_DATATYPE); + /* Destroy the datatype object id group */ + (void)H5I_dec_type_ref(H5I_DATATYPE); + n++; /*H5I*/ /* Reset all the datatype IDs */ H5T_IEEE_F32BE_g = FAIL; @@ -1588,7 +1593,6 @@ H5T_term_interface(void) /* Mark interface as closed */ H5_interface_initialize_g = 0; - n = 1; /*H5I*/ } /* end if */ FUNC_LEAVE_NOAPI(n) @@ -2582,7 +2586,7 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, /* Shut down path */ H5T__print_stats(path, &nprint); path->cdata.command = H5T_CONV_FREE; - if((path->func)(FAIL, FAIL, &(path->cdata), + if((path->func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { #ifdef H5T_DEBUG if(H5DEBUG(T)) { @@ -4399,7 +4403,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, HDsnprintf(H5T_g.path[0]->name, sizeof(H5T_g.path[0]->name), "no-op"); H5T_g.path[0]->func = H5T__conv_noop; H5T_g.path[0]->cdata.command = H5T_CONV_INIT; - if(H5T__conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { + if(H5T__conv_noop((hid_t)FAIL, (hid_t)FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { #ifdef H5T_DEBUG if(H5DEBUG(T)) fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n"); @@ -4558,7 +4562,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, HDassert(table == H5T_g.path[md]); H5T__print_stats(table, &nprint/*in,out*/); table->cdata.command = H5T_CONV_FREE; - if((table->func)(FAIL, FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { + if((table->func)((hid_t)FAIL, (hid_t)FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) { #ifdef H5T_DEBUG if(H5DEBUG(T)) { fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free " |