diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-04-24 17:57:30 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-04-24 17:57:30 (GMT) |
commit | 7dd53873f73ee67046607b50067b543f2a44cab3 (patch) | |
tree | 4d08558545b8403ed43ff27ebb5bd02b8503a52e /src/H5P.c | |
parent | 6682f51a1157dc9e88bd34528fff999aee50ca2a (diff) | |
parent | 4fbe80acc27bc0e84eec9880c3c4257802e5bae5 (diff) | |
download | hdf5-7dd53873f73ee67046607b50067b543f2a44cab3.zip hdf5-7dd53873f73ee67046607b50067b543f2a44cab3.tar.gz hdf5-7dd53873f73ee67046607b50067b543f2a44cab3.tar.bz2 |
Merge branch 'develop' into H10621
Diffstat (limited to 'src/H5P.c')
-rw-r--r-- | src/H5P.c | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -817,14 +817,17 @@ done: /*-------------------------------------------------------------------------- NAME - H5Pencode + H5Pencode2 PURPOSE - Routine to convert the property values in a property list into a binary buffer + Routine to convert the property values in a property list into a binary buffer. + The encoding of property values will be done according to the file format + setting in fapl_id. USAGE - herr_t H5Pencode(plist_id, buf, nalloc) + herr_t H5Pencode(plist_id, buf, nalloc, fapl_id) hid_t plist_id; IN: Identifier to property list to encode void *buf: OUT: buffer to gold the encoded plist size_t *nalloc; IN/OUT: size of buffer needed to encode plist + hid_t fapl_id; IN: File access property list ID RETURNS Returns non-negative on success, negative on failure. DESCRIPTION @@ -837,25 +840,29 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5Pencode(hid_t plist_id, void *buf, size_t *nalloc) +H5Pencode2(hid_t plist_id, void *buf, size_t *nalloc, hid_t fapl_id) { H5P_genplist_t *plist; /* Property list to query */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) - H5TRACE3("e", "i*x*z", plist_id, buf, nalloc); + H5TRACE4("e", "i*x*zi", plist_id, buf, nalloc, fapl_id); /* Check arguments. */ if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); + /* Verify access property list and set up collective metadata if appropriate */ + if(H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + /* Call the internal encode routine */ if((ret_value = H5P__encode(plist, TRUE, buf, nalloc)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list"); done: FUNC_LEAVE_API(ret_value) -} /* H5Pencode() */ +} /* H5Pencode2() */ /*-------------------------------------------------------------------------- |