summaryrefslogtreecommitdiffstats
path: root/src/H5Sselect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-08-12 13:33:42 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-08-12 13:33:42 (GMT)
commit5112232ddf96f7b8b7dca86ce91dc05f3470c682 (patch)
tree239a5e8982540789ec643ec2292a324e296409c8 /src/H5Sselect.c
parent694e9bb380925e38a0711b803bf7dd86f219a07f (diff)
downloadhdf5-5112232ddf96f7b8b7dca86ce91dc05f3470c682.zip
hdf5-5112232ddf96f7b8b7dca86ce91dc05f3470c682.tar.gz
hdf5-5112232ddf96f7b8b7dca86ce91dc05f3470c682.tar.bz2
[svn-r5871] Purpose:
Code cleanup Description: Combined H5P_isa_class and H5I_object functionality into a new internal H5P API function: H5P_object_verify, which checks that a property list is the appropriate class and then returns the property list object associated with the property list ID. This reduces the source code by about 200 LOC and trims the library binary some more. Platforms tested: FreeBSD 4.6 (sleipnir)
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r--src/H5Sselect.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 8f9ebc1..10ece00 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -804,7 +804,7 @@ H5S_select_fscat (H5F_t *f, const struct H5O_layout_t *layout,
assert (_buf);
/* Get the hyperslab vector size */
- if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (dx_plist = H5I_object(dxpl_id)))
+ if(NULL == (dx_plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5P_get(dx_plist,H5D_XFER_HYPER_VECTOR_SIZE_NAME,&vector_size)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value");
@@ -897,7 +897,7 @@ H5S_select_fgath (H5F_t *f, const struct H5O_layout_t *layout,
assert (_buf);
/* Get the hyperslab vector size */
- if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (dx_plist = H5I_object(dxpl_id)))
+ if(NULL == (dx_plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a file access property list");
if (H5P_get(dx_plist,H5D_XFER_HYPER_VECTOR_SIZE_NAME,&vector_size)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "unable to get value");
@@ -983,7 +983,7 @@ H5S_select_mscat (const void *_tscat_buf, size_t elmt_size, const H5S_t *space,
assert (buf);
/* Get the hyperslab vector size */
- if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (dx_plist = H5I_object(dxpl_id)))
+ if(NULL == (dx_plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list");
if (H5P_get(dx_plist,H5D_XFER_HYPER_VECTOR_SIZE_NAME,&vector_size)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value");
@@ -1075,7 +1075,7 @@ H5S_select_mgath (const void *_buf, size_t elmt_size, const H5S_t *space,
assert (tgath_buf);
/* Get the hyperslab vector size */
- if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (dx_plist = H5I_object(dxpl_id)))
+ if(NULL == (dx_plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a dataset transfer property list");
if (H5P_get(dx_plist,H5D_XFER_HYPER_VECTOR_SIZE_NAME,&vector_size)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "unable to get value");
@@ -1165,7 +1165,7 @@ H5S_select_read(H5F_t *f, const H5O_layout_t *layout, H5P_genplist_t *dc_plist,
FUNC_ENTER_NOAPI(H5S_select_read, FAIL);
/* Get the hyperslab vector size */
- if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (dx_plist = H5I_object(dxpl_id)))
+ if(NULL == (dx_plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list");
if (H5P_get(dx_plist,H5D_XFER_HYPER_VECTOR_SIZE_NAME,&vector_size)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value");
@@ -1395,7 +1395,7 @@ H5S_select_write(H5F_t *f, const H5O_layout_t *layout, H5P_genplist_t *dc_plist,
FUNC_ENTER_NOAPI(H5S_select_write, FAIL);
/* Get the hyperslab vector size */
- if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (dx_plist = H5I_object(dxpl_id)))
+ if(NULL == (dx_plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list");
if (H5P_get(dx_plist,H5D_XFER_HYPER_VECTOR_SIZE_NAME,&vector_size)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value");