summaryrefslogtreecommitdiffstats
path: root/hl/src
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-10-24 14:27:37 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-10-24 14:27:37 (GMT)
commitf653b779eb0e2280c227302b22af336325b16a76 (patch)
tree561f29bb3a742027d2994a9a9e87df693cc5d4b5 /hl/src
parent1be95fbe104fb52f1361a4fe7b05ec07e72e9855 (diff)
downloadhdf5-f653b779eb0e2280c227302b22af336325b16a76.zip
hdf5-f653b779eb0e2280c227302b22af336325b16a76.tar.gz
hdf5-f653b779eb0e2280c227302b22af336325b16a76.tar.bz2
Purpose: Fixed Packet Table issues
Description: - Removed calls to H5Tget_native_type from PT APIs because it is up to the application, whether it wants the buffer to be read into memory in the machine’s native architecture. Currently, however, the PT doesn't allow an application to specify memory datatype. Perhaps, a new API can be added to provide that capability. - Added calls to H5Tcopy to H5PTcreate/H5PTcreate_fl/H5PTopen to save a copy of the application's datatype or the dataset's datatype. - Added various missing H5Tclose to the packet table tests, and various error checkings. Note: leave out changes to test_packet_vlen.c for 1.8 to wait on QAK about merging the commit ec2fbe0883f9e76df60bcfbebbd4b6f62d5a09e6 [svn-r30158] first. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'hl/src')
-rw-r--r--hl/src/H5PT.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c
index 5376086..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,7 +261,9 @@ hid_t H5PTcreate_fl ( hid_t loc_id,
if(H5Pclose(plist_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);
@@ -349,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 */