summaryrefslogtreecommitdiffstats
path: root/src/H5P.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-01-28 12:46:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-01-28 12:46:26 (GMT)
commitb1f57d906e4fdafef37f1923e7d8d7e99d4aaa3e (patch)
tree4668c886ff94a853b312c903de62f8b6b955caf7 /src/H5P.c
parentfaab4bbf1b0d17f85c0f2bf681844dc2bb369e99 (diff)
downloadhdf5-b1f57d906e4fdafef37f1923e7d8d7e99d4aaa3e.zip
hdf5-b1f57d906e4fdafef37f1923e7d8d7e99d4aaa3e.tar.gz
hdf5-b1f57d906e4fdafef37f1923e7d8d7e99d4aaa3e.tar.bz2
[svn-r181] Reset hyperslab selection changing changing dataspace dimensions.
Diffstat (limited to 'src/H5P.c')
-rw-r--r--src/H5P.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/H5P.c b/src/H5P.c
index dce4d09..d562042 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -908,6 +908,16 @@ H5Pset_space(hid_t sid, intn rank, const size_t *dims)
} /* end switch */
space->type = H5P_SIMPLE;
+ /* Reset hyperslab definition, if one is defined */
+ if(space->hslab_def==TRUE)
+ {
+ H5MM_xfree(space->h.start);
+ H5MM_xfree(space->h.count);
+ H5MM_xfree(space->h.stride);
+ space->hslab=FALSE;
+
+ } /* end if */
+
if (rank == 0) { /* scalar variable */
space->type = H5P_SCALAR;
space->u.simple.rank = 0; /* set to scalar rank */