summaryrefslogtreecommitdiffstats
path: root/hl/src/H5PT.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-10-20 19:07:45 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-10-20 19:07:45 (GMT)
commit14e308b2e6eada778818abf53949ceef0e7b2a34 (patch)
treeb850fc142df53eab56fdd5593067ca455e20d93e /hl/src/H5PT.c
parentb6bb7c123a02570a33f02257d738e50195dbeb3a (diff)
downloadhdf5-14e308b2e6eada778818abf53949ceef0e7b2a34.zip
hdf5-14e308b2e6eada778818abf53949ceef0e7b2a34.tar.gz
hdf5-14e308b2e6eada778818abf53949ceef0e7b2a34.tar.bz2
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.c14
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 */