diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-08-12 13:33:42 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-08-12 13:33:42 (GMT) |
commit | 5112232ddf96f7b8b7dca86ce91dc05f3470c682 (patch) | |
tree | 239a5e8982540789ec643ec2292a324e296409c8 /src/H5FDmpio.c | |
parent | 694e9bb380925e38a0711b803bf7dd86f219a07f (diff) | |
download | hdf5-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/H5FDmpio.c')
-rw-r--r-- | src/H5FDmpio.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index cf23ed4..25f530e 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -254,7 +254,7 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info) H5TRACE3("e","iMcMi",fapl_id,comm,info); /* Check arguments */ - if(TRUE!=H5P_isa_class(fapl_id,H5P_FILE_ACCESS) || NULL == (plist = H5I_object(fapl_id))) + if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list"); #ifdef LATER @@ -315,7 +315,7 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/) FUNC_ENTER_API(H5Pget_fapl_mpio, FAIL); H5TRACE3("e","ixx",fapl_id,comm,info); - if(TRUE!=H5P_isa_class(fapl_id,H5P_FILE_ACCESS) || NULL == (plist = H5I_object(fapl_id))) + if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list"); if (H5FD_MPIO!=H5P_get_driver(plist)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); @@ -369,7 +369,7 @@ H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode) H5TRACE2("e","iDt",dxpl_id,xfer_mode); /* Check arguments */ - if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (plist = H5I_object(dxpl_id))) + if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); if (H5FD_MPIO_INDEPENDENT!=xfer_mode && H5FD_MPIO_COLLECTIVE!=xfer_mode) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incorrect xfer_mode"); @@ -414,7 +414,7 @@ H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode/*out*/) FUNC_ENTER_API(H5Pget_dxpl_mpio, FAIL); H5TRACE2("e","ix",dxpl_id,xfer_mode); - if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (plist = H5I_object(dxpl_id))) + if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); if (H5FD_MPIO!=H5P_get_driver(plist)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); @@ -566,7 +566,7 @@ H5FD_mpio_setup(hid_t dxpl_id, MPI_Datatype btype, MPI_Datatype ftype, unsigned FUNC_ENTER_NOAPI(H5FD_mpio_setup, FAIL); /* Check arguments */ - if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (plist = H5I_object(dxpl_id))) + if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dataset transfer list"); /* Set buffer MPI type */ @@ -610,7 +610,7 @@ H5FD_mpio_teardown(hid_t dxpl_id) FUNC_ENTER_NOAPI(H5FD_mpio_teardown, FAIL); /* Check arguments */ - if(TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (plist = H5I_object(dxpl_id))) + if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dataset transfer list"); /* Remove buffer MPI type */ @@ -844,7 +844,7 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id, #endif /* Obtain a pointer to mpio-specific file access properties */ - if(TRUE!=H5P_isa_class(fapl_id,H5P_FILE_ACCESS) || NULL == (plist = H5I_object(fapl_id))) + if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); if (H5P_DEFAULT==fapl_id || H5FD_MPIO!=H5P_get_driver(plist)) { _fa.comm = MPI_COMM_SELF; /*default*/ |