diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2011-02-18 19:01:34 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2011-02-18 19:01:34 (GMT) |
commit | 4f75c8c24bea54dcbdc64fbcbf7c77b8ae797c61 (patch) | |
tree | 4fe0ae2bd3daee51e0240e7fe0926987e14af1e6 /src/H5T.c | |
parent | 40d2ecb45f317bf2a91fbf937e8cc11c45d9898b (diff) | |
download | hdf5-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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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: |