mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
Changed the return type of H5Pget_driver_info() from void * to
const void *. Fixes HDFFV-10017.
This commit is contained in:
parent
2b5efccc30
commit
8eaa0af305
@ -6915,7 +6915,7 @@ public class H5 implements java.io.Serializable {
|
||||
|
||||
// File access property list (FAPL) routines //
|
||||
// herr_t H5Pset_driver( hid_t plist_id, hid_t new_driver_id, const void *new_driver_info )
|
||||
// void *H5Pget_driver_info( hid_t plist_id )
|
||||
// const void *H5Pget_driver_info( hid_t plist_id )
|
||||
// herr_t H5Pget_multi_type ( hid_t fapl_id, H5FD_mem_t *type )
|
||||
// herr_t H5Pset_multi_type ( hid_t fapl_id, H5FD_mem_t type )
|
||||
// herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t *buf_len_ptr);
|
||||
|
@ -534,7 +534,7 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
|
||||
hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
|
||||
haddr_t *memb_addr/*out*/, hbool_t *relax)
|
||||
{
|
||||
H5FD_multi_fapl_t *fa;
|
||||
const H5FD_multi_fapl_t *fa;
|
||||
H5FD_mem_t mt;
|
||||
static const char *func="H5FDget_fapl_multi"; /* Function Name for error reporting */
|
||||
|
||||
@ -548,7 +548,7 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
|
||||
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list", -1)
|
||||
if(H5FD_MULTI != H5Pget_driver(fapl_id))
|
||||
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", -1)
|
||||
if(NULL == (fa= (H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id)))
|
||||
if(NULL == (fa= (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id)))
|
||||
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1)
|
||||
|
||||
if (memb_map)
|
||||
@ -992,7 +992,7 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id,
|
||||
{
|
||||
H5FD_multi_t *file=NULL;
|
||||
hid_t close_fapl=-1;
|
||||
H5FD_multi_fapl_t *fa;
|
||||
const H5FD_multi_fapl_t *fa;
|
||||
H5FD_mem_t m;
|
||||
static const char *func="H5FD_multi_open"; /* Function Name for error reporting */
|
||||
|
||||
@ -1018,7 +1018,7 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id,
|
||||
if(H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE)<0)
|
||||
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error)
|
||||
}
|
||||
fa = (H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id);
|
||||
fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id);
|
||||
assert(fa);
|
||||
ALL_MEMBERS(mt) {
|
||||
file->fa.memb_map[mt] = fa->memb_map[mt];
|
||||
|
@ -875,11 +875,11 @@ done:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void *
|
||||
const void *
|
||||
H5Pget_driver_info(hid_t plist_id)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
void *ret_value; /* Return value */
|
||||
H5P_genplist_t *plist = NULL; /* Property list pointer */
|
||||
const void *ret_value = NULL; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(NULL)
|
||||
H5TRACE1("*x", "i", plist_id);
|
||||
@ -888,7 +888,7 @@ H5Pget_driver_info(hid_t plist_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list")
|
||||
|
||||
/* Get the driver info */
|
||||
if(NULL == (ret_value = (void *)H5P_peek_driver_info(plist)))
|
||||
if(NULL == (ret_value = (const void *)H5P_peek_driver_info(plist)))
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver info")
|
||||
|
||||
done:
|
||||
|
@ -311,7 +311,7 @@ H5_DLL herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold/*out*/,
|
||||
H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id,
|
||||
const void *driver_info);
|
||||
H5_DLL hid_t H5Pget_driver(hid_t plist_id);
|
||||
H5_DLL void *H5Pget_driver_info(hid_t plist_id);
|
||||
H5_DLL const void *H5Pget_driver_info(hid_t plist_id);
|
||||
H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset);
|
||||
H5_DLL herr_t H5Pget_family_offset(hid_t fapl_id, hsize_t *offset);
|
||||
H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user