mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r181] Reset hyperslab selection changing changing dataspace dimensions.
This commit is contained in:
parent
faab4bbf1b
commit
b1f57d906e
10
src/H5P.c
10
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user