summaryrefslogtreecommitdiffstats
path: root/src/H5FDcore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-09-16 22:27:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-09-16 22:27:49 (GMT)
commitee7612be44b3797a903e21433558a52331515ce1 (patch)
treecce28a3a6e169f1668ad1a0356e907f0dddbfde6 /src/H5FDcore.c
parent222e7186ea78e49b387284cbb9997677c933c368 (diff)
downloadhdf5-ee7612be44b3797a903e21433558a52331515ce1.zip
hdf5-ee7612be44b3797a903e21433558a52331515ce1.tar.gz
hdf5-ee7612be44b3797a903e21433558a52331515ce1.tar.bz2
[svn-r27811] Description:
Refactor property list code to "deep copy" properties in the correct way, retraining the rest of the library to copy & release things correctly. This cleans up another batch of memory leaks, etc. within the library. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel Linux/32 2.6.x (jam) w/serial & parallel (h5committest forthcoming)
Diffstat (limited to 'src/H5FDcore.c')
-rw-r--r--src/H5FDcore.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index ac5d7ed..17ec07c 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -534,7 +534,7 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
fa.increment = increment;
fa.backing_store = backing_store;
- ret_value= H5P_set_driver(plist, H5FD_CORE, &fa);
+ ret_value = H5P_set_driver(plist, H5FD_CORE, &fa);
done:
FUNC_LEAVE_API(ret_value)
@@ -556,8 +556,8 @@ done:
herr_t
H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_store /*out*/)
{
- H5FD_core_fapl_t *fa;
H5P_genplist_t *plist; /* Property list pointer */
+ const H5FD_core_fapl_t *fa;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -565,14 +565,14 @@ H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_stor
if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- if(H5FD_CORE != H5P_get_driver(plist))
+ if(H5FD_CORE != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
- if(NULL == (fa = (H5FD_core_fapl_t *)H5P_get_driver_info(plist)))
+ if(NULL == (fa = (const H5FD_core_fapl_t *)H5P_peek_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
- if (increment)
+ if(increment)
*increment = fa->increment;
- if (backing_store)
+ if(backing_store)
*backing_store = fa->backing_store;
done:
@@ -658,7 +658,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
HDassert(H5P_DEFAULT != fapl_id);
if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
- if(NULL == (fa = (H5FD_core_fapl_t *)H5P_get_driver_info(plist)))
+ if(NULL == (fa = (H5FD_core_fapl_t *)H5P_peek_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, NULL, "bad VFL driver info")
/* Build the open flags */
@@ -668,7 +668,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
if(H5F_ACC_EXCL & flags) o_flags |= O_EXCL;
/* Retrieve initial file image info */
- if(H5P_get(plist, H5F_ACS_FILE_IMAGE_INFO_NAME, &file_image_info) < 0)
+ if(H5P_peek(plist, H5F_ACS_FILE_IMAGE_INFO_NAME, &file_image_info) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial file image info")
/* If the file image exists and this is an open, make sure the file doesn't exist */