diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2016-10-23 22:13:52 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2016-10-23 22:13:52 (GMT) |
commit | d51b785f4e7ff0dd3a456924a1808935e5fc7a0b (patch) | |
tree | 84d2b4f49a018875db029b0ba04091a88aa080ed /hl/src/H5PT.c | |
parent | 6ad305ee9d7ad4cdd8630de60aca0a11e73b848d (diff) | |
parent | be613da6b804e56a51f43a053bf35d898dccb420 (diff) | |
download | hdf5-d51b785f4e7ff0dd3a456924a1808935e5fc7a0b.zip hdf5-d51b785f4e7ff0dd3a456924a1808935e5fc7a0b.tar.gz hdf5-d51b785f4e7ff0dd3a456924a1808935e5fc7a0b.tar.bz2 |
Merge pull request #1 in ~BMRIBLER/hdf5_bmr_packet_table from HDFFV-8882-replace-numeric-exit-code-with to develop
Accidentally in the wrong branch so merging over to "develop" now.
* commit 'be613da6b804e56a51f43a053bf35d898dccb420':
Miscellaneous code cleanup. Platforms tested: Linux/32 2.6 (jam) Darwin (osx1010test)
Description: - Removed calls to H5Tget_native_type in the PT code. The application would need to do that if desired. - Added Abhi's program to tests to verify the fix. - This fix might have fixed HDFFV-9927, HDFFV-9042, and the issue reported by Barbara Jones from Ametek as well. Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
Diffstat (limited to 'hl/src/H5PT.c')
-rw-r--r-- | hl/src/H5PT.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c index 647cbe8..5f0f94f 100644 --- a/hl/src/H5PT.c +++ b/hl/src/H5PT.c @@ -141,7 +141,9 @@ hid_t H5PTcreate(hid_t loc_id, if(H5Pclose(plistcopy_id) < 0) goto error; - if((table->type_id = H5Tget_native_type(dtype_id, H5T_DIR_DEFAULT)) < 0) + /* Make a copy of caller's datatype and save it in the table structure. + It will be closed when the table is closed */ + if((table->type_id = H5Tcopy(dtype_id)) < 0) goto error; H5PT_create_index(table); @@ -259,12 +261,11 @@ hid_t H5PTcreate_fl ( hid_t loc_id, if(H5Pclose(plist_id) < 0) goto error; + /* Make a copy of caller's datatype and save it in the table structure. + It will be closed when the table is closed */ if((table->type_id = H5Tcopy(dtype_id)) < 0) goto error; - if((table->type_id = H5Tget_native_type(table->type_id, H5T_DIR_DEFAULT)) < 0) - goto error; - H5PT_create_index(table); table->size = 0; @@ -352,8 +353,9 @@ hid_t H5PTopen( hid_t loc_id, if((type_id = H5Dget_type(table->dset_id)) < 0) goto error; - /* Get the table's native datatype */ - if((table->type_id = H5Tget_native_type(type_id, H5T_DIR_ASCEND)) < 0) + /* Make a copy of the datatype obtained and save it in the table structure. + It will be closed when the table is closed */ + if((table->type_id = H5Tcopy(type_id)) < 0) goto error; /* Close the disk datatype */ |