diff options
author | hdftest <hdftest@hdfgroup.org> | 2018-06-24 22:37:20 (GMT) |
---|---|---|
committer | hdftest <hdftest@hdfgroup.org> | 2018-06-24 22:37:20 (GMT) |
commit | e9f476dad47ce593f13dacb77b1cc664d1f24e7b (patch) | |
tree | c775d3e8a991a37373c0ec640d7a8c2e6b883b3c /src/H5Pencdec.c | |
parent | 2ff00b1b937ebe36ac6ddf590c16a4c27fc0b053 (diff) | |
parent | 25f80cbbec3a7d8036325784168b029cb71cc813 (diff) | |
download | hdf5-e9f476dad47ce593f13dacb77b1cc664d1f24e7b.zip hdf5-e9f476dad47ce593f13dacb77b1cc664d1f24e7b.tar.gz hdf5-e9f476dad47ce593f13dacb77b1cc664d1f24e7b.tar.bz2 |
Merge pull request #1116 in HDFFV/hdf5 from ~HDFTEST/hdf5_hft:hdf5_1_10 to develop
* commit '25f80cbbec3a7d8036325784168b029cb71cc813': (324 commits)
Snapshot version 1.10 release 3 (snap3)
Update document
HDFFV-10433 Updated text to address issues raised.
Snapshot version 1.10 release 3 (snap2)
Updated version to 1.10.3-snap2
Merge corrections from develop
HDFFV-10473 add note for attribute fix
Correct attribute location
HDFFV-9739 and cmake improvements merge from develop
Fix for HDFFV-10469: set to latest format for virtual layout encoding.
Update Windows test machines
Fix soversion
Fixed libver bounds underscore issue
removed extraneous lib. ver. bound, PR comment
temporary fix for HDFFV-10469
Updated version to 1.10.3-snap1
Add new file
Correct number of tests
Whitespace and test reclassify merge from develop
HDFFV-10444 fix so numbers and merge java test changes
...
Diffstat (limited to 'src/H5Pencdec.c')
-rw-r--r-- | src/H5Pencdec.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c index 73c48d7..3332098 100644 --- a/src/H5Pencdec.c +++ b/src/H5Pencdec.c @@ -49,9 +49,10 @@ /* Typedef for iterator when encoding a property list */ typedef struct { - hbool_t encode; /* Whether the property list should be encoded */ - size_t *enc_size_ptr; /* Pointer to size of encoded buffer */ - void **pp; /* Pointer to encoding buffer pointer */ + hbool_t encode; /* Whether the property list should be encoded */ + size_t *enc_size_ptr; /* Pointer to size of encoded buffer */ + void **pp; /* Pointer to encoding buffer pointer */ + hid_t fapl_id; /* File access property list */ } H5P_enc_iter_ud_t; @@ -90,7 +91,7 @@ typedef struct { *------------------------------------------------------------------------- */ herr_t -H5P__encode_size_t(const void *value, void **_pp, size_t *size) +H5P__encode_size_t(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint64_t enc_value = (uint64_t)*(const size_t *)value; /* Property value to encode */ uint8_t **pp = (uint8_t **)_pp; @@ -132,7 +133,7 @@ H5P__encode_size_t(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ herr_t -H5P__encode_hsize_t(const void *value, void **_pp, size_t *size) +H5P__encode_hsize_t(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint64_t enc_value = (uint64_t)*(const hsize_t *)value; /* Property value to encode */ unsigned enc_size = H5VM_limit_enc_size(enc_value); /* Size of encoded property */ @@ -173,7 +174,7 @@ H5P__encode_hsize_t(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ herr_t -H5P__encode_unsigned(const void *value, void **_pp, size_t *size) +H5P__encode_unsigned(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint8_t **pp = (uint8_t **)_pp; @@ -212,7 +213,7 @@ H5P__encode_unsigned(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ herr_t -H5P__encode_uint8_t(const void *value, void **_pp, size_t *size) +H5P__encode_uint8_t(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint8_t **pp = (uint8_t **)_pp; @@ -248,7 +249,7 @@ H5P__encode_uint8_t(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ herr_t -H5P__encode_hbool_t(const void *value, void **_pp, size_t *size) +H5P__encode_hbool_t(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint8_t **pp = (uint8_t **)_pp; @@ -283,7 +284,7 @@ H5P__encode_hbool_t(const void *value, void **_pp, size_t *size) *------------------------------------------------------------------------- */ herr_t -H5P__encode_double(const void *value, void **_pp, size_t *size) +H5P__encode_double(const void *value, void **_pp, size_t *size, void H5_ATTR_UNUSED *udata) { uint8_t **pp = (uint8_t **)_pp; @@ -332,7 +333,8 @@ static int H5P__encode_cb(H5P_genprop_t *prop, void *_udata) { H5P_enc_iter_ud_t *udata = (H5P_enc_iter_ud_t *)_udata; /* Pointer to user data */ - int ret_value = H5_ITER_CONT; /* Return value */ + H5P_enc_cb_info_t cb_udata; /* User data for property iteration callback */ + int ret_value = H5_ITER_CONT; /* Return value */ FUNC_ENTER_STATIC @@ -355,7 +357,8 @@ H5P__encode_cb(H5P_genprop_t *prop, void *_udata) /* Encode (or not, if *(udata->pp) is NULL) the property value */ prop_value_len = 0; - if((prop->encode)(prop->value, udata->pp, &prop_value_len) < 0) + cb_udata.fapl_id = udata->fapl_id; + if((prop->encode)(prop->value, udata->pp, &prop_value_len, &cb_udata) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, H5_ITER_ERROR, "property encoding routine failed") *(udata->enc_size_ptr) += prop_value_len; } /* end if */ @@ -390,7 +393,7 @@ done: --------------------------------------------------------------------------*/ herr_t H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, void *buf, - size_t *nalloc) + size_t *nalloc, hid_t fapl_id) { H5P_enc_iter_ud_t udata; /* User data for property iteration callback */ uint8_t *p = (uint8_t *)buf; /* Temporary pointer to encoding buffer */ @@ -425,6 +428,7 @@ H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, void *buf, udata.encode = encode; udata.enc_size_ptr = &encode_size; udata.pp = (void **)&p; + udata.fapl_id = fapl_id; /* Iterate over all properties in property list, encoding them */ idx = 0; |