summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-03-24 21:56:52 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-03-24 21:56:52 (GMT)
commite0db90bcc422a1290286e0cae5d561fe765f2e68 (patch)
treed00cd16ea6e597f9deaed9d8d94d43a484121402 /src/H5S.c
parent13299383ea1ddd9688f343ced7789a8a39f72099 (diff)
downloadhdf5-e0db90bcc422a1290286e0cae5d561fe765f2e68.zip
hdf5-e0db90bcc422a1290286e0cae5d561fe765f2e68.tar.gz
hdf5-e0db90bcc422a1290286e0cae5d561fe765f2e68.tar.bz2
[svn-r26559] Fix error in H5S_extent_copy (needs testing) - would not patch number of
elements selected with "all" slections nor reset sharing state. Fix error in H5S__hyper_project_intersection algorithm. Note there are still some code coverage assertions in the selection matching algorithm - if you hit these try taking them out. Note make check still fails in h5dump test (unrelated to this checkin). Tested: ummon
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/H5S.c b/src/H5S.c
index a548f13..4d6ef76 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -511,10 +511,20 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src)
HDassert(dst);
HDassert(src);
- /* Copy */
+ /* Copy extent */
if(H5S_extent_copy_real(&(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")
+
+ /* Mark the destination space as no longer shared if it was before */
+ if(H5O_msg_reset_share(H5O_SDSPACE_ID, dst) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRESET, FAIL, "can't stop sharing dataspace")
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_extent_copy() */