summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2011-02-18 19:01:34 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2011-02-18 19:01:34 (GMT)
commit4f75c8c24bea54dcbdc64fbcbf7c77b8ae797c61 (patch)
tree4fe0ae2bd3daee51e0240e7fe0926987e14af1e6 /src/H5T.c
parent40d2ecb45f317bf2a91fbf937e8cc11c45d9898b (diff)
downloadhdf5-4f75c8c24bea54dcbdc64fbcbf7c77b8ae797c61.zip
hdf5-4f75c8c24bea54dcbdc64fbcbf7c77b8ae797c61.tar.gz
hdf5-4f75c8c24bea54dcbdc64fbcbf7c77b8ae797c61.tar.bz2
[svn-r20121] Bug 1586 - the datatype handler created with H5Tencode/decode had the reference count 0. I fixed it by changing the APP_REF parameter of H5I_register from FALSE to TRUE and added a test case in dtypes.c.
Tested on jam, heiwa, and amani.
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 1f962f0..25b241b 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -2807,6 +2807,11 @@ done:
* slu@ncsa.uiuc.edu
* July 14, 2004
*
+ * Modification:Raymond Lu
+ * songyulu@hdfgroup.org
+ * 17 February 2011
+ * I changed the value for the APP_REF parameter of H5I_register
+ * from FALSE to TRUE.
*-------------------------------------------------------------------------
*/
hid_t
@@ -2827,7 +2832,7 @@ H5Tdecode(const void *buf)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "can't decode object")
/* Register the type and return the ID */
- if((ret_value = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)
+ if((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register data type")
done: