diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-11-20 19:07:22 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-11-20 19:07:22 (GMT) |
commit | 6ab0e9f0929738cdb3ba87fd409c68ad3db4178c (patch) | |
tree | 8142391516c53e90569f4e8ff4dcde376fcf16f9 /src/H5Sall.c | |
parent | 2e53165b47744ad71645492f74d4332371cc5179 (diff) | |
download | hdf5-6ab0e9f0929738cdb3ba87fd409c68ad3db4178c.zip hdf5-6ab0e9f0929738cdb3ba87fd409c68ad3db4178c.tar.gz hdf5-6ab0e9f0929738cdb3ba87fd409c68ad3db4178c.tar.bz2 |
[svn-r4620] Purpose:
Code cleanup
Description:
Get rid of IDs from internal function calls and some small cleanups from
the old-stype => generic property list conversion.
Platforms tested:
FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'src/H5Sall.c')
-rw-r--r-- | src/H5Sall.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/H5Sall.c b/src/H5Sall.c index 26b4abd..0e896d9 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -11,11 +11,12 @@ #define H5S_PACKAGE /*suppress error about including H5Spkg */ #include "H5private.h" +#include "H5Dprivate.h" #include "H5Eprivate.h" #include "H5Iprivate.h" #include "H5Spkg.h" +#include "H5Tprivate.h" /* Datatypes */ #include "H5Vprivate.h" -#include "H5Dprivate.h" /* Interface initialization */ #define PABLO_MASK H5Sall_mask @@ -1201,9 +1202,10 @@ H5S_all_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t op hsize_t offset; /* offset of region in buffer */ hsize_t nelemts; /* Number of elements to iterate through */ void *tmp_buf; /* temporary location of the element in the buffer */ - unsigned rank; /* Dataspace rank */ - int indx; /* Index to increment */ - herr_t ret_value=0; /* return value */ + unsigned rank; /* Dataspace rank */ + int indx; /* Index to increment */ + H5T_t *dt; /* Datatype structure */ + herr_t ret_value=0; /* return value */ FUNC_ENTER (H5S_all_select_iterate, 0); @@ -1217,7 +1219,11 @@ H5S_all_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t op /* Set up the size of the memory space */ HDmemcpy(mem_size, space->extent.u.simple.size, rank*sizeof(hsize_t)); - mem_size[rank]=H5Tget_size(type_id); + + /* Set the size of the datatype */ + if (NULL==(dt=H5I_object(type_id))) + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype"); + mem_size[rank]=H5T_get_size(dt); /* Set the coordinates to zero */ HDmemset(mem_offset, 0, (rank+1)*sizeof(hsize_t)); |