summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-02-24 19:54:48 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-02-24 19:54:48 (GMT)
commit28111339143e6c3f9aa8d4f96c771472a1a79c55 (patch)
tree76000c9a80ce336f86cdf85d4d0cf01fc34464ac /src/H5S.c
parent80e77e7d778ea5d5bfcfc92f9492cdfdc1dd0197 (diff)
downloadhdf5-28111339143e6c3f9aa8d4f96c771472a1a79c55.zip
hdf5-28111339143e6c3f9aa8d4f96c771472a1a79c55.tar.gz
hdf5-28111339143e6c3f9aa8d4f96c771472a1a79c55.tar.bz2
[svn-r26293] Implement patching of virtual dataspace extent in mapping dataspaces when
opening virtual dataset. Add tests for this. Tested: ummon
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c43
1 files changed, 38 insertions, 5 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 7798049..106d75a 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -479,7 +479,7 @@ H5Sextent_copy(hid_t dst_id,hid_t src_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Copy */
- if(H5S_extent_copy(&(dst->extent), &(src->extent), TRUE) < 0)
+ if(H5S_extent_copy_real(&(dst->extent), &(src->extent), TRUE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent")
done:
@@ -488,7 +488,40 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5S_extent_copy
+ * Function: H5S_extent_copy
+ *
+ * Purpose: Copies a dataspace extent
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Neil Fortner
+ * Monday, February 23, 2015
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5S_extent_copy(H5S_t *dst, const H5S_t *src)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ HDassert(dst);
+ HDassert(src);
+
+ /* Copy */
+ if(H5S_extent_copy_real(&(dst->extent), &(src->extent), TRUE) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5S_extent_copy() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5S_extent_copy_real
*
* Purpose: Copies a dataspace extent
*
@@ -502,7 +535,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max)
+H5S_extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max)
{
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
@@ -551,7 +584,7 @@ H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5S_extent_copy() */
+} /* end H5S_extent_copy_real() */
/*-------------------------------------------------------------------------
@@ -587,7 +620,7 @@ H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy the source dataspace's extent */
- if(H5S_extent_copy(&(dst->extent), &(src->extent), copy_max) < 0)
+ if(H5S_extent_copy_real(&(dst->extent), &(src->extent), copy_max) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent")
/* Copy the source dataspace's selection */