diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2019-04-08 19:11:28 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2019-04-08 19:11:28 (GMT) |
commit | 52276f3713eec584044bc72d4724507848cfeba0 (patch) | |
tree | 2bd8e746308a6f19d0302403e3f0492dd8dc63ed /src/H5P.c | |
parent | 74677ba5ce41ab9db100e2059ceb85b44b874466 (diff) | |
parent | 3ccc98e256587c43f6ba5a31a2cf9d922f4e1773 (diff) | |
download | hdf5-52276f3713eec584044bc72d4724507848cfeba0.zip hdf5-52276f3713eec584044bc72d4724507848cfeba0.tar.gz hdf5-52276f3713eec584044bc72d4724507848cfeba0.tar.bz2 |
Merge pull request #1645 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/HDFFV-10365-h5sencode-decode-bug-when-num to develop
* commit '3ccc98e256587c43f6ba5a31a2cf9d922f4e1773':
Modifications based on PR feedback: (1) Add H5Sdeprec.c to src/CMakeLists.txt (2) Add test for H5Sencode1.
Modification for num_elem based on PR feedback.
HDFFV-10365: Changes as described in the RFC: H5Sencode/H5Sdecode Format Change. This also addresses HDFFV-10255: H5Sencode/decode performance issue.
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() */ /*-------------------------------------------------------------------------- |