diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-11-28 17:11:27 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-11-28 17:11:27 (GMT) |
commit | 3d84163ad37960ff1ecdd5782af88b442832fd99 (patch) | |
tree | 99d6ea66069bef7d37ca3abbf823e731f374b3c3 /src/H5Ffake.c | |
parent | e1dd55be8538ee0ebd1c46be3df4b306a3ac6f3f (diff) | |
download | hdf5-3d84163ad37960ff1ecdd5782af88b442832fd99.zip hdf5-3d84163ad37960ff1ecdd5782af88b442832fd99.tar.gz hdf5-3d84163ad37960ff1ecdd5782af88b442832fd99.tar.bz2 |
Fix for HDFFV-9947 H5Sencode
Modifications to fix H5Sencode bug when num points selected is > 2^32.
Diffstat (limited to 'src/H5Ffake.c')
-rw-r--r-- | src/H5Ffake.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/H5Ffake.c b/src/H5Ffake.c index 6072f2e..86c4a3d 100644 --- a/src/H5Ffake.c +++ b/src/H5Ffake.c @@ -15,9 +15,10 @@ /* Packages needed by this file... */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* File access */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5Fpkg.h" /* File access */ /* PRIVATE PROTOTYPES */ @@ -40,9 +41,11 @@ *------------------------------------------------------------------------- */ H5F_t * -H5F_fake_alloc(uint8_t sizeof_size) +H5F_fake_alloc(uint8_t sizeof_size, hid_t fapl_id) { H5F_t *f = NULL; /* Pointer to fake file struct */ + H5P_genplist_t *plist; /* Property list */ + hbool_t latest; H5F_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -59,6 +62,16 @@ H5F_fake_alloc(uint8_t sizeof_size) else f->shared->sizeof_size = sizeof_size; + /* Activate latest version support according to the setting in fapl_id */ + /* See H5F_new() in H5Fint.c */ + if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list") + + if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &latest) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'latest format' flag") + if(latest) + f->shared->latest_flags |= H5F_LATEST_ALL_FLAGS; + /* Set return value */ ret_value = f; |