diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2015-04-02 19:17:42 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2015-04-02 19:17:42 (GMT) |
commit | 3e0eae188b28136ca7981ffcabeb41bae97c1bea (patch) | |
tree | 8c685916f350bb49df8d42c9efbc23dd82048280 /src | |
parent | be81aef60fc799b47aec3258d5d6caea8ee510ad (diff) | |
download | hdf5-3e0eae188b28136ca7981ffcabeb41bae97c1bea.zip hdf5-3e0eae188b28136ca7981ffcabeb41bae97c1bea.tar.gz hdf5-3e0eae188b28136ca7981ffcabeb41bae97c1bea.tar.bz2 |
[svn-r26709] Port r26690 from trunk to 1.8 branch.
Tested: jam, koala, ostrich (h5committest)
Log from r26690:
Fix error in H5Sextent_copy
When the selection is set to all, H5Sextent_copy did not update the number of
elements in the selection in the destination space. Fixed H5Sextent_copy to do
this. Added tests for this functionality.
Tested: jam, koala, ostrich (h5committest)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5S.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -482,6 +482,12 @@ H5Sextent_copy(hid_t dst_id,hid_t src_id) if(H5S_extent_copy(&(dst->extent), &(src->extent), TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent") + /* If the selection is 'all', update the number of elements selected in the + * destination space */ + if(H5S_SEL_ALL == H5S_GET_SELECT_TYPE(dst)) + if(H5S_select_all(dst, FALSE) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + done: FUNC_LEAVE_API(ret_value) } /* end H5Sextent_copy() */ |