diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2012-12-20 05:44:13 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2012-12-20 05:44:13 (GMT) |
commit | bac0fbe4d64dca6c7cf8cbd0991546cfec8c95be (patch) | |
tree | 2452c7e099e5564faad45fcc62a5a0fd421c6629 /hl/src | |
parent | a2432bcb45e3766672c3313c28ef55d08adf1f61 (diff) | |
download | hdf5-bac0fbe4d64dca6c7cf8cbd0991546cfec8c95be.zip hdf5-bac0fbe4d64dca6c7cf8cbd0991546cfec8c95be.tar.gz hdf5-bac0fbe4d64dca6c7cf8cbd0991546cfec8c95be.tar.bz2 |
[svn-r23112] Brought revision 22610 from the trunk to the branch:
svn merge -r 22609:22610 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/hl .
Fixes bug HDFFV-8055 (and HDFFV-8278)
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5TB.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c index 1ba9073..0b6305b 100644 --- a/hl/src/H5TB.c +++ b/hl/src/H5TB.c @@ -1309,6 +1309,7 @@ herr_t H5TBdelete_record( hid_t loc_id, hid_t tid=-1; hid_t sid=-1; hid_t m_sid=-1; + hid_t mem_type_id=-1; hsize_t count[1]; hsize_t offset[1]; hsize_t mem_size[1]; @@ -1370,6 +1371,10 @@ herr_t H5TBdelete_record( hid_t loc_id, if ((sid = H5Dget_space( did )) < 0) goto out; + /* create the memory data type. */ + if ((mem_type_id=H5TB_create_type( loc_id, dset_name, src_size, src_offset, src_sizes, tid)) < 0) + goto out; + /* define a hyperslab in the dataset of the size of the records */ offset[0] = start; count[0] = read_nrecords; @@ -1381,12 +1386,14 @@ herr_t H5TBdelete_record( hid_t loc_id, if ((m_sid = H5Screate_simple( 1, mem_size, NULL )) < 0) goto out; - if (H5Dwrite( did, tid, m_sid, sid, H5P_DEFAULT, tmp_buf ) < 0) + if (H5Dwrite( did, mem_type_id, m_sid, sid, H5P_DEFAULT, tmp_buf ) < 0) goto out; /* close */ if (H5Sclose( m_sid ) < 0) goto out; + if (H5Tclose( mem_type_id ) < 0) + goto out; if (H5Sclose( sid ) < 0) goto out; if (H5Tclose( tid ) < 0) @@ -1426,6 +1433,7 @@ out: free(src_sizes); H5E_BEGIN_TRY { + H5Tclose(mem_type_id); H5Dclose(did); H5Tclose(tid); H5Sclose(sid); |