From 5c8be3ae430be6c74655ff343d0dcf48c19032cd Mon Sep 17 00:00:00 2001 From: Lori Cooper Date: Sun, 15 Dec 2024 10:20:24 -0600 Subject: [PATCH 1/3] Add sponsor info in funding.yml (#5177) --- .github/FUNDING.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index aa22b9d0ae9..4d53d6a7a45 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,3 @@ # These are supported funding model platforms + +github: hdfgroup From f0cffc90ac0f28818c054db5c467a3cdf2574f58 Mon Sep 17 00:00:00 2001 From: bmribler <39579120+bmribler@users.noreply.github.com> Date: Mon, 16 Dec 2024 09:02:46 -0500 Subject: [PATCH 2/3] Add release information to enum constants - Part 2 (#5176) Added \since to enum constants added in 1.10.x versions --- src/H5ACpublic.h | 12 +++++++- src/H5Dpublic.h | 6 ++-- src/H5FDdevelop.h | 8 ++++++ src/H5FDhdfs.h | 6 ++-- src/H5FDlog.h | 68 ++++++++++++++++++++++++++++++---------------- src/H5FDmirror.h | 2 +- src/H5FDpublic.h | 29 ++++++++++++++------ src/H5FDros3.h | 6 ++++ src/H5FDsplitter.h | 4 +-- src/H5Fpublic.h | 5 ++-- src/H5Ldevelop.h | 2 +- src/H5Opublic.h | 6 ++-- src/H5PLpublic.h | 3 +- src/H5public.h | 29 ++++++++++++-------- 14 files changed, 123 insertions(+), 63 deletions(-) diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h index 3e989394788..eb0f3da7490 100644 --- a/src/H5ACpublic.h +++ b/src/H5ACpublic.h @@ -719,8 +719,18 @@ typedef struct H5AC_cache_config_t { #define H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION 1 +/** + * No limit on number of times a prefetched entry can appear in subsequent + * cache images + * \since 1.10.1 + */ #define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE -1 -#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX 100 +/** + * Limit on number of times a prefetched entry can appear in subsequent + * cache images + * \since 1.10.1 + */ +#define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX 100 //! /** diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index bc41ece2739..f307be7f176 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -28,9 +28,7 @@ #define H5D_CHUNK_CACHE_NBYTES_DEFAULT SIZE_MAX #define H5D_CHUNK_CACHE_W0_DEFAULT (-1.0) -/** - * Bit flags for the H5Pset_chunk_opts() and H5Pget_chunk_opts() - */ +/** Bit flags for the H5Pset/get_chunk_opts() \since 1.10.0 */ #define H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS (0x0002u) /*******************/ @@ -1697,7 +1695,7 @@ H5_DLL herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type); */ #ifndef H5_NO_DEPRECATED_SYMBOLS -/* Macros */ +/** v1 B-tree index \since 1.10.0 */ #define H5D_CHUNK_BTREE H5D_CHUNK_IDX_BTREE /* Formerly used to support the H5DOread/write_chunk() API calls. diff --git a/src/H5FDdevelop.h b/src/H5FDdevelop.h index f6915ef3c73..0933b827767 100644 --- a/src/H5FDdevelop.h +++ b/src/H5FDdevelop.h @@ -92,41 +92,49 @@ /** * Extensible array header block; it is mapped to 'ohdr' type file memory to * benefit from their similarity. + * \since 1.10.0 */ #define H5FD_MEM_EARRAY_HDR H5FD_MEM_OHDR /** * Extensible array index block; it is mapped to 'ohdr' type file memory because * these index blocks are similar to extensible array header blocks. + * \since 1.10.0 */ #define H5FD_MEM_EARRAY_IBLOCK H5FD_MEM_OHDR /** * Extensible array super block; it is mappend to 'btree' type file memory * because the indices are similar enough to B-tree nodes. + * \since 1.10.0 */ #define H5FD_MEM_EARRAY_SBLOCK H5FD_MEM_BTREE /** * Extensible array data block; it is mapped to 'lheap' type file memory * because it is similar enough to local heap info. + * \since 1.10.0 */ #define H5FD_MEM_EARRAY_DBLOCK H5FD_MEM_LHEAP /** * Extensible array data block & page; it is mapped to 'lheap' type file memory * because it is similar enough to local heap info. + * \since 1.10.0 */ #define H5FD_MEM_EARRAY_DBLK_PAGE H5FD_MEM_LHEAP /** * Fixed array header block; it is mapped to 'ohdr' type file memory to * benefit their similarity. + * \since 1.10.0 */ #define H5FD_MEM_FARRAY_HDR H5FD_MEM_OHDR /** * Fixed array data block; it is mapped to 'lheap' type file memory * because it is similar enough to local heap info. + * \since 1.10.0 */ #define H5FD_MEM_FARRAY_DBLOCK H5FD_MEM_LHEAP /** * Fixed array data block & page; it is mapped to 'lheap' type file memory * because it is similar enough to local heap info. + * \since 1.10.0 */ #define H5FD_MEM_FARRAY_DBLK_PAGE H5FD_MEM_LHEAP diff --git a/src/H5FDhdfs.h b/src/H5FDhdfs.h index 6ceb86ee2c2..bf18e4fa59a 100644 --- a/src/H5FDhdfs.h +++ b/src/H5FDhdfs.h @@ -47,11 +47,11 @@ */ #define H5FD__CURR_HDFS_FAPL_T_VERSION 1 -/** Max size of the node name \since 1.8.22 */ +/** Max size of the node name \since 1.8.22 1.10.6 */ #define H5FD__HDFS_NODE_NAME_SPACE 128 -/** Max size of the user name \since 1.8.22 */ +/** Max size of the user name \since 1.8.22 1.10.6 */ #define H5FD__HDFS_USER_NAME_SPACE 128 -/** Max size of the kerberos cache path \since 1.8.22 */ +/** Max size of the kerberos cache path \since 1.8.22 1.10.6 */ #define H5FD__HDFS_KERB_CACHE_PATH_SPACE 128 /** diff --git a/src/H5FDlog.h b/src/H5FDlog.h index 871845cf189..55ca106bdd5 100644 --- a/src/H5FDlog.h +++ b/src/H5FDlog.h @@ -27,40 +27,60 @@ #define H5FD_LOG_VALUE H5_VFD_LOG /* Flags for H5Pset_fapl_log() */ -/* Flags for tracking 'meta' operations (truncate) */ + +/** Flag for tracking truncate operation \since 1.10.1 */ #define H5FD_LOG_TRUNCATE 0x00000001 -#define H5FD_LOG_META_IO (H5FD_LOG_TRUNCATE) -/* Flags for tracking where reads/writes/seeks occur */ -#define H5FD_LOG_LOC_READ 0x00000002 +/** Flag for tracking meta IO operations \since 1.10.1 */ +#define H5FD_LOG_META_IO (H5FD_LOG_TRUNCATE) +/** Flag for tracking where reads occur \since 1.6.0 */ +#define H5FD_LOG_LOC_READ 0x00000002 +/** Flag for tracking where writes occur \since 1.6.0 */ #define H5FD_LOG_LOC_WRITE 0x00000004 -#define H5FD_LOG_LOC_SEEK 0x00000008 -#define H5FD_LOG_LOC_IO (H5FD_LOG_LOC_READ | H5FD_LOG_LOC_WRITE | H5FD_LOG_LOC_SEEK) -/* Flags for tracking number of times each byte is read/written */ -#define H5FD_LOG_FILE_READ 0x00000010 +/** Flag for tracking where seeks occur \since 1.6.0 */ +#define H5FD_LOG_LOC_SEEK 0x00000008 +/** Flag for tracking where IO operations occur \since 1.6.0 */ +#define H5FD_LOG_LOC_IO (H5FD_LOG_LOC_READ | H5FD_LOG_LOC_WRITE | H5FD_LOG_LOC_SEEK) +/** Flag for tracking number of times each byte is read \since 1.6.0 */ +#define H5FD_LOG_FILE_READ 0x00000010 +/** Flag for tracking number of times each byte is written \since 1.6.0 */ #define H5FD_LOG_FILE_WRITE 0x00000020 -#define H5FD_LOG_FILE_IO (H5FD_LOG_FILE_READ | H5FD_LOG_FILE_WRITE) -/* Flag for tracking "flavor" (type) of information stored at each byte */ +/** Flag for tracking number of times each byte is read/written \since 1.6.0 */ +#define H5FD_LOG_FILE_IO (H5FD_LOG_FILE_READ | H5FD_LOG_FILE_WRITE) +/** Flag for tracking "flavor" (type) of information stored at each byte \since 1.6.0 */ #define H5FD_LOG_FLAVOR 0x00000040 -/* Flags for tracking total number of reads/writes/seeks/truncates */ -#define H5FD_LOG_NUM_READ 0x00000080 -#define H5FD_LOG_NUM_WRITE 0x00000100 -#define H5FD_LOG_NUM_SEEK 0x00000200 +/** Flag for tracking total number of reads \since 1.6.0 */ +#define H5FD_LOG_NUM_READ 0x00000080 +/** Flag for tracking total number of writes \since 1.6.0 */ +#define H5FD_LOG_NUM_WRITE 0x00000100 +/** Flag for tracking total number of seeks \since 1.6.0 */ +#define H5FD_LOG_NUM_SEEK 0x00000200 +/** Flag for tracking total number of truncates \since 1.8.7 */ #define H5FD_LOG_NUM_TRUNCATE 0x00000400 -#define H5FD_LOG_NUM_IO (H5FD_LOG_NUM_READ | H5FD_LOG_NUM_WRITE | H5FD_LOG_NUM_SEEK | H5FD_LOG_NUM_TRUNCATE) -/* Flags for tracking time spent in open/stat/read/write/seek/truncate/close */ -#define H5FD_LOG_TIME_OPEN 0x00000800 -#define H5FD_LOG_TIME_STAT 0x00001000 -#define H5FD_LOG_TIME_READ 0x00002000 -#define H5FD_LOG_TIME_WRITE 0x00004000 -#define H5FD_LOG_TIME_SEEK 0x00008000 +/** Flag for tracking total number of IO operations \since 1.6.0 */ +#define H5FD_LOG_NUM_IO (H5FD_LOG_NUM_READ | H5FD_LOG_NUM_WRITE | H5FD_LOG_NUM_SEEK | H5FD_LOG_NUM_TRUNCATE) +/** Flag for tracking time spent in open \since 1.8.7 */ +#define H5FD_LOG_TIME_OPEN 0x00000800 +/** Flag for tracking time spent in stat \since 1.8.7 */ +#define H5FD_LOG_TIME_STAT 0x00001000 +/** Flag for tracking time spent in read \since 1.8.7 */ +#define H5FD_LOG_TIME_READ 0x00002000 +/** Flag for tracking time spent in write \since 1.6.0 */ +#define H5FD_LOG_TIME_WRITE 0x00004000 +/** Flag for tracking time spent in seek \since 1.6.0 */ +#define H5FD_LOG_TIME_SEEK 0x00008000 +/** Flag for tracking time spent in truncate \since 1.10.1 */ #define H5FD_LOG_TIME_TRUNCATE 0x00010000 -#define H5FD_LOG_TIME_CLOSE 0x00020000 +/** Flag for tracking time spent in close \since 1.6.0 */ +#define H5FD_LOG_TIME_CLOSE 0x00020000 +/** Flag for tracking time spent in IO operations \since 1.6.0 */ #define H5FD_LOG_TIME_IO \ (H5FD_LOG_TIME_OPEN | H5FD_LOG_TIME_STAT | H5FD_LOG_TIME_READ | H5FD_LOG_TIME_WRITE | \ H5FD_LOG_TIME_SEEK | H5FD_LOG_TIME_TRUNCATE | H5FD_LOG_TIME_CLOSE) -/* Flags for tracking allocation/release of space in file */ +/** Flag for tracking allocation of space in file \since 1.6.0 */ #define H5FD_LOG_ALLOC 0x00040000 -#define H5FD_LOG_FREE 0x00080000 +/** Flag for tracking release of space in file \since 1.10.1 */ +#define H5FD_LOG_FREE 0x00080000 +/** Flag for tracking all info \since 1.6.0 */ #define H5FD_LOG_ALL \ (H5FD_LOG_FREE | H5FD_LOG_ALLOC | H5FD_LOG_TIME_IO | H5FD_LOG_NUM_IO | H5FD_LOG_FLAVOR | \ H5FD_LOG_FILE_IO | H5FD_LOG_LOC_IO | H5FD_LOG_META_IO) diff --git a/src/H5FDmirror.h b/src/H5FDmirror.h index 3758dc083fa..74db0fe1a1f 100644 --- a/src/H5FDmirror.h +++ b/src/H5FDmirror.h @@ -22,7 +22,7 @@ #ifdef H5_HAVE_MIRROR_VFD -/** ID for the mirror VFD */ +/** ID for the mirror VFD \since 1.10.7 */ #define H5FD_MIRROR (H5OPEN H5FD_MIRROR_id_g) /** Identifier for the mirror VFD */ diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index cab2a263038..0fc45125226 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -94,11 +94,13 @@ * from the file when it is flushed/closed, if the file is opened R/W). */ #define H5FD_FEAT_IGNORE_DRVRINFO 0x00000020 -/* +/** * Defining the H5FD_FEAT_DIRTY_DRVRINFO_LOAD for a VFL driver means that * the library will mark the driver info dirty when the file is opened * R/W. This will cause the driver info to be re-encoded when the file * is flushed/closed. + * + * \since 1.10.0 */ #define H5FD_FEAT_DIRTY_DRVRINFO_LOAD 0x00000040 /* @@ -108,13 +110,14 @@ */ #define H5FD_FEAT_POSIX_COMPAT_HANDLE 0x00000080 -#define H5FD_FEAT_HAS_MPI 0x00000100 -/**< Defining H5FD_FEAT_HAS_MPI for a VFL driver means that - * the driver makes use of MPI communication and code may retrieve - * communicator/rank information from it +/** + * Defining H5FD_FEAT_HAS_MPI for a VFL driver means that + * the driver makes use of MPI communication and code may retrieve + * communicator/rank information from it * * \since 1.8.15 */ +#define H5FD_FEAT_HAS_MPI 0x00000100 #define H5FD_FEAT_ALLOCATE_EARLY 0x00000200 /**< Defining the H5FD_FEAT_ALLOCATE_EARLY for a VFL driver will force @@ -136,31 +139,39 @@ * image to store in memory. */ #define H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS 0x00000800 -/* +/** * Defining H5FD_FEAT_SUPPORTS_SWMR_IO for a VFL driver means that the * driver supports the single-writer/multiple-readers I/O pattern. + * + * \since 1.10.0 */ #define H5FD_FEAT_SUPPORTS_SWMR_IO 0x00001000 -/* +/** * Defining H5FD_FEAT_USE_ALLOC_SIZE for a VFL driver * means that the library will just pass the allocation size to the * the driver's allocation callback which will eventually handle alignment. * This is specifically used for the multi/split driver. + * + * \since 1.10.1 */ #define H5FD_FEAT_USE_ALLOC_SIZE 0x00002000 -/* +/** * Defining H5FD_FEAT_PAGED_AGGR for a VFL driver * means that the driver needs special file space mapping for paged aggregation. * This is specifically used for the multi/split driver. + * + * \since 1.10.1 */ #define H5FD_FEAT_PAGED_AGGR 0x00004000 -/* +/** * Defining H5FD_FEAT_DEFAULT_VFD_COMPATIBLE for a VFL driver * that creates a file which is compatible with the default VFD. * Generally, this means that the VFD creates a single file that follows * the canonical HDF5 file format. * Regarding the Splitter VFD specifically, only drivers with this flag * enabled may be used as the Write-Only (W/O) channel driver. + * + * \since 1.10.2 */ #define H5FD_FEAT_DEFAULT_VFD_COMPATIBLE 0x00008000 /* diff --git a/src/H5FDros3.h b/src/H5FDros3.h index ff51d6baae2..f91f6801ced 100644 --- a/src/H5FDros3.h +++ b/src/H5FDros3.h @@ -47,16 +47,22 @@ /** * \def H5FD_ROS3_MAX_REGION_LEN * Maximum string length for specifying the region of the S3 bucket. + * + * \since 1.10.6 */ #define H5FD_ROS3_MAX_REGION_LEN 32 /** * \def H5FD_ROS3_MAX_SECRET_ID_LEN * Maximum string length for specifying the security ID. + * + * \since 1.10.6 */ #define H5FD_ROS3_MAX_SECRET_ID_LEN 128 /** * \def H5FD_ROS3_MAX_SECRET_KEY_LEN * Maximum string length for specifying the security key. + * + * \since 1.10.6 */ #define H5FD_ROS3_MAX_SECRET_KEY_LEN 128 /** diff --git a/src/H5FDsplitter.h b/src/H5FDsplitter.h index 66e3ebaf38f..48d7107c4ba 100644 --- a/src/H5FDsplitter.h +++ b/src/H5FDsplitter.h @@ -31,11 +31,11 @@ /** * Maximum length of a filename/path string in the Write-Only channel, - * including the NULL-terminator. + * including the NULL-terminator. \since 1.10.7 */ #define H5FD_SPLITTER_PATH_MAX 4096 -/** Semi-unique constant used to help identify structure pointers */ +/** Semi-unique constant used to help identify structure pointers \since 1.10.7 */ #define H5FD_SPLITTER_MAGIC 0x2B916880 //! diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index f8644b83f21..bacd6fa01a4 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -204,6 +204,7 @@ typedef enum H5F_file_space_type_t { } H5F_file_space_type_t; //! +/** Total number of metadata read retry types \since 1.10.0 */ #define H5F_NUM_METADATA_READ_RETRY_TYPES 21 /** @@ -229,11 +230,11 @@ typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata); #define H5F_RFIC_UNUSUAL_NUM_UNUSED_NUMERIC_BITS \ (0x0001u) /**< Suppress errors for numeric datatypes with an unusually \ * high number of unused bits. See documentation for \ - * H5Pset_relax_file_integrity_checks for details. */ + * H5Pset_relax_file_integrity_checks() for details. */ #define H5F_RFIC_ALL \ (H5F_RFIC_UNUSUAL_NUM_UNUSED_NUMERIC_BITS) /**< Suppress all format integrity check \ * errors. See documentation for \ - * H5Pset_relax_file_integrity_checks \ + * H5Pset_relax_file_integrity_checks() \ * for details. */ /*********************/ diff --git a/src/H5Ldevelop.h b/src/H5Ldevelop.h index 21d7458d512..5a619c8c44a 100644 --- a/src/H5Ldevelop.h +++ b/src/H5Ldevelop.h @@ -299,7 +299,7 @@ H5_DLL herr_t H5Lunregister(H5L_type_t id); */ #ifndef H5_NO_DEPRECATED_SYMBOLS -/* Previous versions of the H5L_class_t struct */ +/** Previous versions of the H5L_class_t struct \since 1.10.3 */ #define H5L_LINK_CLASS_T_VERS_0 0 /** Callback during link traversal */ diff --git a/src/H5Opublic.h b/src/H5Opublic.h index 8968ac1f1e2..3c7b74adb81 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -78,9 +78,9 @@ * These flags determine which fields will be filled in the H5O_info_t * struct. */ -#define H5O_INFO_BASIC 0x0001u /**< Fill in the fileno, addr, type, and rc fields */ -#define H5O_INFO_TIME 0x0002u /**< Fill in the atime, mtime, ctime, and btime fields */ -#define H5O_INFO_NUM_ATTRS 0x0004u /**< Fill in the num_attrs field */ +#define H5O_INFO_BASIC 0x0001u /**< Fill in the fileno, addr, type, and rc fields \since 1.10.3 */ +#define H5O_INFO_TIME 0x0002u /**< Fill in the atime, mtime, ctime, and btime fields \since 1.10.3 */ +#define H5O_INFO_NUM_ATTRS 0x0004u /**< Fill in the num_attrs field \since 1.10.3 */ #define H5O_INFO_ALL (H5O_INFO_BASIC | H5O_INFO_TIME | H5O_INFO_NUM_ATTRS) //! diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index 8e72949df3b..1c7bd911cd2 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -23,8 +23,7 @@ /* Public Typedefs */ /*******************/ -/* Special string to indicate no plugin loading. - */ +/** Special string to indicate no plugin loading \since 1.10.2 */ #define H5PL_NO_PLUGIN "::" //! diff --git a/src/H5public.h b/src/H5public.h index 7e5b20f2a06..48f9beff95c 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -327,15 +327,22 @@ typedef off_t HDoff_t; * should be discouraged in new code. */ typedef int64_t hssize_t; -#define PRIdHSIZE PRId64 -#define PRIiHSIZE PRIi64 -#define PRIoHSIZE PRIo64 -#define PRIuHSIZE PRIu64 -#define PRIxHSIZE PRIx64 +/** d print conversion specifier for signed integer type \since 1.10.8 */ +#define PRIdHSIZE PRId64 +/** i print conversion specifier for signed integer type \since 1.10.8 */ +#define PRIiHSIZE PRIi64 +/** o print conversion specifier for signed integer type \since 1.10.8 */ +#define PRIoHSIZE PRIo64 +/** u print conversion specifier for signed integer type \since 1.10.8 */ +#define PRIuHSIZE PRIu64 +/** x print conversion specifier for signed integer type \since 1.10.8 */ +#define PRIxHSIZE PRIx64 +/** X print conversion specifier for signed integer type \since 1.10.8 */ #define PRIXHSIZE PRIX64 #define H5_SIZEOF_HSIZE_T 8 #define H5_SIZEOF_HSSIZE_T 8 -#define HSIZE_UNDEF UINT64_MAX +/** Represents the largest possible value of uint64_t \since 1.10.0 */ +#define HSIZE_UNDEF UINT64_MAX /** * The address of an object in the file. @@ -343,15 +350,15 @@ typedef int64_t hssize_t; * \internal Defined as a (minimum) 64-bit unsigned integer type. */ typedef uint64_t haddr_t; -/** d print conversion specifier \since 1.8.23 */ +/** d print conversion specifier for unsigned integer type \since 1.8.23 */ #define PRIdHADDR PRId64 -/** o print conversion specifier \since 1.8.23 */ +/** o print conversion specifier for unsigned integer type \since 1.8.23 */ #define PRIoHADDR PRIo64 -/** u print conversion specifier \since 1.8.23 */ +/** u print conversion specifier for unsigned integer type \since 1.8.23 */ #define PRIuHADDR PRIu64 -/** x print conversion specifier \since 1.8.23 */ +/** x print conversion specifier for unsigned integer type \since 1.8.23 */ #define PRIxHADDR PRIx64 -/** x print conversion specifier \since 1.8.23 */ +/** X print conversion specifier for unsigned integer type \since 1.8.23 */ #define PRIXHADDR PRIX64 #define H5_SIZEOF_HADDR_T 8 #define HADDR_UNDEF UINT64_MAX From 914640e1230fb91317d62e8e83d1e648dda8db65 Mon Sep 17 00:00:00 2001 From: Matt L <124107509+mattjala@users.noreply.github.com> Date: Tue, 17 Dec 2024 07:52:46 -0600 Subject: [PATCH 3/3] Prevent H5Pset* routines from modifying default plists (#5172) * Prevent H5Pset_vol from changing default VOL * Prevent public routines from modifying default plists * Allow default backing FAPL for onion VFD * Require FAPL in H5Pset_vol() * Merge into existing H5P tests --- release_docs/RELEASE.txt | 10 +++ src/H5FDcore.c | 8 +-- src/H5FDdirect.c | 6 +- src/H5FDfamily.c | 4 +- src/H5FDhdfs.c | 4 +- src/H5FDlog.c | 4 +- src/H5FDmirror.c | 4 +- src/H5FDmpio.c | 20 +++--- src/H5FDonion.c | 10 +-- src/H5FDros3.c | 10 +-- src/H5FDsec2.c | 2 +- src/H5FDsplitter.c | 2 +- src/H5FDsubfiling/H5FDioc.c | 6 +- src/H5FDsubfiling/H5FDsubfiling.c | 8 +-- src/H5FDsubfiling/H5subfiling_common.c | 2 +- src/H5FDwindows.c | 2 +- src/H5Fmpi.c | 2 +- src/H5Lexternal.c | 4 +- src/H5Pdapl.c | 24 ++++---- src/H5Pdcpl.c | 50 +++++++-------- src/H5Pdeprec.c | 2 +- src/H5Pdxpl.c | 54 ++++++++--------- src/H5Pfapl.c | 84 +++++++++++++------------- src/H5Pfcpl.c | 36 +++++------ src/H5Pgcpl.c | 16 ++--- src/H5Pint.c | 43 ++++++++++++- src/H5Plapl.c | 28 ++++----- src/H5Plcpl.c | 4 +- src/H5Pmapl.c | 4 +- src/H5Pocpl.c | 34 +++++------ src/H5Pocpypl.c | 12 ++-- src/H5Pprivate.h | 3 +- src/H5Pstrcpl.c | 4 +- src/H5VLnative_attr.c | 4 +- src/H5VLnative_dataset.c | 2 +- src/H5Z.c | 2 +- src/H5Znbit.c | 2 +- src/H5Zscaleoffset.c | 2 +- src/H5Zshuffle.c | 2 +- src/H5Zszip.c | 2 +- test/tgenprop.c | 76 +++++++++++++++++++++++ 41 files changed, 362 insertions(+), 236 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 3a4a705d443..ccb73119e62 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -406,7 +406,17 @@ New Features There is no API compatibility wrapper for this change. Fixes GitHub issue #3506 + + - H5Pset* routines now fail when used on default property lists + + Modifying default property lists was never fully supported and could produce + inconsistent and unexpected behavior. + + - H5Pset_vol() now fails when used on a non-file-access property list + Similar to the above. Setting the connector on a non-FAPL had no effect on + library behavior, and the connector ID and information could not be read back + from that plist later. Parallel Library: ----------------- diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 408b7c57f59..42542c4dabc 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -508,7 +508,7 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page_size cannot be zero"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_PLIST, H5E_BADID, FAIL, "can't find object for ID"); if (H5FD_CORE != H5P_peek_driver(plist)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); @@ -550,7 +550,7 @@ H5Pget_core_write_tracking(hid_t plist_id, hbool_t *is_enabled /*out*/, size_t * FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_PLIST, H5E_BADID, FAIL, "can't find object for ID"); if (H5FD_CORE != H5P_peek_driver(plist)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); @@ -588,7 +588,7 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store) FUNC_ENTER_API(FAIL) /* Check argument */ - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Set VFD info values */ @@ -624,7 +624,7 @@ H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_stor FUNC_ENTER_API(FAIL) - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD_CORE != H5P_peek_driver(plist)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index ba287b9d4a4..0dfb2e7cbf0 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -222,7 +222,7 @@ H5Pset_fapl_direct(hid_t fapl_id, size_t boundary, size_t block_size, size_t cbu FUNC_ENTER_API(FAIL) - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD__direct_populate_config(boundary, block_size, cbuf_size, &fa) < 0) @@ -256,7 +256,7 @@ H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary /*out*/, size_t *block_size / FUNC_ENTER_API(FAIL) - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); if (H5FD_DIRECT != H5P_peek_driver(plist)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); @@ -443,7 +443,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct"); /* Get the driver specific information */ - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); if (NULL == (fa = (const H5FD_direct_fapl_t *)H5P_peek_driver_info(plist))) { if (H5FD__direct_populate_config(0, 0, 0, &default_fa) < 0) diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index e186c06017e..fa65dc594cc 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -378,7 +378,7 @@ H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize /*out*/, hid_t *memb_fapl_id /* FUNC_ENTER_API(FAIL) - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); if (H5FD_FAMILY != H5P_peek_driver(plist)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); @@ -1118,7 +1118,7 @@ H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle) FUNC_ENTER_PACKAGE /* Get the plist structure and family offset */ - if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_VFL, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_get(plist, H5F_ACS_FAMILY_OFFSET_NAME, &offset) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get offset for family driver"); diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c index 615067d1e22..f1e3837a2d3 100644 --- a/src/H5FDhdfs.c +++ b/src/H5FDhdfs.c @@ -582,7 +582,7 @@ H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa) fprintf(stdout, "called %s.\n", __func__); #endif - plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); + plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false); if (plist == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (FAIL == H5FD__hdfs_validate_config(fa)) @@ -621,7 +621,7 @@ H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_dst /*out*/) if (fa_dst == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst ptr is NULL"); - plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); + plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true); if (plist == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); diff --git a/src/H5FDlog.c b/src/H5FDlog.c index f3877f684ed..cd55ded0aca 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -270,7 +270,7 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si memset(&fa, 0, sizeof(H5FD_log_fapl_t)); /* Check arguments */ - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Duplicate the log file string @@ -446,7 +446,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) o_flags |= O_EXCL; /* Get the driver specific information */ - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); if (NULL == (fa = (const H5FD_log_fapl_t *)H5P_peek_driver_info(plist))) { /* Use default driver configuration*/ diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c index d566eafe080..2cc8f005eeb 100644 --- a/src/H5FDmirror.c +++ b/src/H5FDmirror.c @@ -1247,7 +1247,7 @@ H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_dst /*out*/) if (NULL == fa_dst) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst is NULL"); - plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); + plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true); if (NULL == plist) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5P_peek_driver(plist) != H5FD_MIRROR) @@ -1284,7 +1284,7 @@ H5Pset_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa) LOG_OP_CALL(__func__); - plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); + plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false); if (NULL == plist) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (NULL == fa) diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index cce5d2ee1ff..793678ca470 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -427,7 +427,7 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info) /* Check arguments */ if (fapl_id == H5P_DEFAULT) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list"); if (MPI_COMM_NULL == comm) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "MPI_COMM_NULL is not a valid communicator"); @@ -485,7 +485,7 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm /*out*/, MPI_Info *info /*out*/) *info = MPI_INFO_NULL; /* Check arguments */ - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list"); if (H5FD_MPIO != H5P_peek_driver(plist)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "VFL driver is not MPI-I/O"); @@ -549,7 +549,7 @@ H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode) /* Check arguments */ if (dxpl_id == H5P_DEFAULT) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); - if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); if (H5FD_MPIO_INDEPENDENT != xfer_mode && H5FD_MPIO_COLLECTIVE != xfer_mode) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incorrect xfer_mode"); @@ -589,7 +589,7 @@ H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode /*out*/) FUNC_ENTER_API(FAIL) /* Check arguments */ - if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Initialize driver, if it's not yet */ @@ -633,7 +633,7 @@ H5Pset_dxpl_mpio_collective_opt(hid_t dxpl_id, H5FD_mpio_collective_opt_t opt_mo /* Check arguments */ if (dxpl_id == H5P_DEFAULT) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); - if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Initialize driver, if it's not yet */ @@ -676,7 +676,7 @@ H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode) /* Check arguments */ if (dxpl_id == H5P_DEFAULT) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); - if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Initialize driver, if it's not yet */ @@ -717,7 +717,7 @@ H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc) /* Check arguments */ if (dxpl_id == H5P_DEFAULT) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); - if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Initialize driver, if it's not yet */ @@ -761,7 +761,7 @@ H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_ch /* Check arguments */ if (dxpl_id == H5P_DEFAULT) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); - if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Initialize driver, if it's not yet */ @@ -904,7 +904,7 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "can't initialize driver"); /* Get a pointer to the fapl */ - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); if (H5FD_mpi_self_initialized_s) { @@ -3822,7 +3822,7 @@ H5FD__mpio_delete(const char *filename, hid_t fapl_id) if (H5FD__mpio_init() < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize driver"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); assert(H5FD_MPIO == H5P_peek_driver(plist)); diff --git a/src/H5FDonion.c b/src/H5FDonion.c index ddbc25bc04c..cb118c3f881 100644 --- a/src/H5FDonion.c +++ b/src/H5FDonion.c @@ -278,7 +278,7 @@ H5Pget_fapl_onion(hid_t fapl_id, H5FD_onion_fapl_info_t *fa_out) if (NULL == fa_out) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL info-out pointer"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not a valid FAPL ID"); if (H5FD_ONION != H5P_peek_driver(plist)) @@ -316,7 +316,7 @@ H5Pset_fapl_onion(hid_t fapl_id, const H5FD_onion_fapl_info_t *fa) FUNC_ENTER_API(FAIL) - if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not a valid FAPL ID"); if (NULL == fa) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL info pointer"); @@ -328,11 +328,11 @@ H5Pset_fapl_onion(hid_t fapl_id, const H5FD_onion_fapl_info_t *fa) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info page size"); if (H5P_DEFAULT == fa->backing_fapl_id) { - if (NULL == (backing_fapl = H5P_object_verify(H5P_FILE_ACCESS_DEFAULT, H5P_FILE_ACCESS))) + if (NULL == (backing_fapl = H5P_object_verify(H5P_FILE_ACCESS_DEFAULT, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid backing fapl id"); } else { - if (NULL == (backing_fapl = H5P_object_verify(fa->backing_fapl_id, H5P_FILE_ACCESS))) + if (NULL == (backing_fapl = H5P_object_verify(fa->backing_fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid backing fapl id"); } @@ -1635,7 +1635,7 @@ H5FDonion_get_revision_count(const char *filename, hid_t fapl_id, uint64_t *revi HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "revision count can't be null"); /* Make sure using the correct driver */ - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid FAPL ID"); if (H5FD_ONION != H5P_peek_driver(plist)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Onion VFL driver"); diff --git a/src/H5FDros3.c b/src/H5FDros3.c index 02698c59399..39bbaec1775 100644 --- a/src/H5FDros3.c +++ b/src/H5FDros3.c @@ -295,7 +295,7 @@ H5Pset_fapl_ros3(hid_t fapl_id, const H5FD_ros3_fapl_t *fa) assert(fa != NULL); - plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); + plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false); if (plist == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); @@ -357,7 +357,7 @@ H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_dst /*out*/) if (fa_dst == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst is NULL"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); if (H5FD_ROS3 != H5P_peek_driver(plist)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fapl not set to use the ros3 VFD"); @@ -489,7 +489,7 @@ H5Pget_fapl_ros3_token(hid_t fapl_id, size_t size, char *token_dst /*out*/) if (token_dst == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "token_dst is NULL"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD_ROS3 != H5P_peek_driver(plist)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); @@ -641,7 +641,7 @@ H5Pset_fapl_ros3_token(hid_t fapl_id, const char *token) if (fapl_id == H5P_DEFAULT) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD_ROS3 != H5P_peek_driver(plist)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); @@ -717,7 +717,7 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr"); if (flags != H5F_ACC_RDONLY) HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "only Read-Only access allowed"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); /* Initialize driver, if it's not yet */ diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 0475f9a7647..778910915c6 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -223,7 +223,7 @@ H5Pset_fapl_sec2(hid_t fapl_id) FUNC_ENTER_API(FAIL) - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); ret_value = H5P_set_driver(plist, H5FD_SEC2, NULL, NULL); diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 495328c40eb..0536ab29a4e 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -329,7 +329,7 @@ H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config /*out*/) config->wo_fapl_id = H5I_INVALID_HID; /* Check and get the splitter fapl */ - if (NULL == (plist_ptr = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist_ptr = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD_SPLITTER != H5P_peek_driver(plist_ptr)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c index e1c61883169..f178b45ac6f 100644 --- a/src/H5FDsubfiling/H5FDioc.c +++ b/src/H5FDsubfiling/H5FDioc.c @@ -319,7 +319,7 @@ H5Pset_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *vfd_config) FUNC_ENTER_API(FAIL) - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Initialize driver, if it's not yet */ @@ -369,7 +369,7 @@ H5Pget_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *config_out) /* Check arguments */ if (config_out == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_out is NULL"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Initialize driver, if it's not yet */ @@ -1249,7 +1249,7 @@ H5FD__ioc_delete(const char *name, hid_t fapl) if (H5FD__ioc_init() < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize driver"); - if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); assert(H5FD_IOC == H5P_peek_driver(plist)); diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c index 8deb746cfa0..bafe0d65181 100644 --- a/src/H5FDsubfiling/H5FDsubfiling.c +++ b/src/H5FDsubfiling/H5FDsubfiling.c @@ -451,7 +451,7 @@ H5Pset_fapl_subfiling(hid_t fapl_id, const H5FD_subfiling_config_t *vfd_config) FUNC_ENTER_API(FAIL) - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Initialize driver, if it's not yet */ @@ -479,7 +479,7 @@ H5Pset_fapl_subfiling(hid_t fapl_id, const H5FD_subfiling_config_t *vfd_config) comm = MPI_COMM_WORLD; /* Set MPI parameters on IOC FAPL */ - if (NULL == (ioc_plist = H5P_object_verify(vfd_config->ioc_fapl_id, H5P_FILE_ACCESS))) + if (NULL == (ioc_plist = H5P_object_verify(vfd_config->ioc_fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5P_set(ioc_plist, H5F_ACS_MPI_PARAMS_COMM_NAME, &comm) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set MPI communicator on plist"); @@ -532,7 +532,7 @@ H5Pget_fapl_subfiling(hid_t fapl_id, H5FD_subfiling_config_t *config_out) if (config_out == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_out is NULL"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Initialize driver, if it's not yet */ @@ -1784,7 +1784,7 @@ H5FD__subfiling_delete(const char *name, hid_t fapl) if (H5FD__subfiling_init() < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize driver"); - if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD_SUBFILING != H5P_peek_driver(plist)) diff --git a/src/H5FDsubfiling/H5subfiling_common.c b/src/H5FDsubfiling/H5subfiling_common.c index 9b393412242..3e0fc3abf48 100644 --- a/src/H5FDsubfiling/H5subfiling_common.c +++ b/src/H5FDsubfiling/H5subfiling_common.c @@ -522,7 +522,7 @@ H5FD__subfiling_open_stub_file(const char *name, unsigned flags, MPI_Comm file_c if ((fapl_id = H5P_create_id(H5P_CLS_FILE_ACCESS_g, false)) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "can't create FAPL for stub file"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, FAIL, "not a file access property list"); /* Use MPI I/O driver for stub file to allow access to vector I/O */ diff --git a/src/H5FDwindows.c b/src/H5FDwindows.c index 182958fcb15..4852c90845f 100644 --- a/src/H5FDwindows.c +++ b/src/H5FDwindows.c @@ -47,7 +47,7 @@ H5Pset_fapl_windows(hid_t fapl_id) FUNC_ENTER_API(FAIL) - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); ret_value = H5P_set_driver(plist, H5FD_WINDOWS, NULL, NULL); diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c index 78909aa1bf2..9b8039a20d6 100644 --- a/src/H5Fmpi.c +++ b/src/H5Fmpi.c @@ -395,7 +395,7 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm) unsigned long driver_feat_flags; H5FD_class_t *driver_class = NULL; - if (NULL == (plist = H5P_object_verify(acspl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(acspl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a file access list"); if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c index 888ff404679..0d0e890e51e 100644 --- a/src/H5Lexternal.c +++ b/src/H5Lexternal.c @@ -134,7 +134,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons obj_name = (const char *)p + fname_len + 1; /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, H5I_INVALID_HID, "can't find object for ID"); /* Get the fapl_id set for lapl_id if any */ @@ -162,7 +162,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get elink callback info"); /* Get file access property list */ - if (NULL == (fa_plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (fa_plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, H5I_INVALID_HID, "can't find object for ID"); /* Make callback if it exists */ diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index af123632963..586664547af 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -771,7 +771,7 @@ H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double "raw data cache w0 value must be between 0.0 and 1.0 inclusive, or H5D_CHUNK_CACHE_W0_DEFAULT"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set sizes */ @@ -811,7 +811,7 @@ H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots /*out*/, size_t *rdcc_nbyt FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get default file access plist */ @@ -1076,7 +1076,7 @@ H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid bounds option"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ @@ -1107,7 +1107,7 @@ H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value from property list */ @@ -1216,7 +1216,7 @@ H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid printf gap size"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ @@ -1248,7 +1248,7 @@ H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value from property list */ @@ -1300,7 +1300,7 @@ H5Pset_append_flush(hid_t plist_id, unsigned ndims, const hsize_t *boundary, H5D HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set up values */ @@ -1348,7 +1348,7 @@ H5Pget_append_flush(hid_t plist_id, unsigned ndims, hsize_t boundary[], H5D_appe FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve info for append flush */ @@ -1397,7 +1397,7 @@ H5Pset_efile_prefix(hid_t plist_id, const char *prefix) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set prefix */ @@ -1429,7 +1429,7 @@ H5Pget_efile_prefix(hid_t plist_id, char *prefix /*out*/, size_t size) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current prefix */ @@ -1483,7 +1483,7 @@ H5Pset_virtual_prefix(hid_t plist_id, const char *prefix) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set prefix */ @@ -1517,7 +1517,7 @@ H5Pget_virtual_prefix(hid_t plist_id, char *prefix /*out*/, size_t size) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current prefix */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 3186e11c041..483df29c803 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1823,7 +1823,7 @@ H5Pset_layout(hid_t plist_id, H5D_layout_t layout_type) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "raw data layout method is not valid"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get pointer to correct default layout */ @@ -1879,7 +1879,7 @@ H5Pget_layout(hid_t plist_id) FUNC_ENTER_API(H5D_LAYOUT_ERROR) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, H5D_LAYOUT_ERROR, "can't find object for ID"); /* Peek at layout property */ @@ -1942,7 +1942,7 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]) } /* end for */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set chunk information in property list */ @@ -1978,7 +1978,7 @@ H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Peek at the layout property */ @@ -2050,7 +2050,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "invalid mapping selections"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current layout */ @@ -2200,7 +2200,7 @@ H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/) if (count) { /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ @@ -2241,7 +2241,7 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t idx) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ @@ -2294,7 +2294,7 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ @@ -2393,7 +2393,7 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ @@ -2450,7 +2450,7 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ @@ -2497,7 +2497,7 @@ H5Pset_chunk_opts(hid_t plist_id, unsigned options) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "unknown chunk options"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ @@ -2544,7 +2544,7 @@ H5Pget_chunk_opts(hid_t plist_id, unsigned *options /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ @@ -2603,7 +2603,7 @@ H5Pset_external(hid_t plist_id, const char *name, HDoff_t offset, hsize_t size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "negative external file offset"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_peek(plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0) @@ -2665,7 +2665,7 @@ H5Pget_external_count(hid_t plist_id) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ @@ -2711,7 +2711,7 @@ H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ @@ -2770,7 +2770,7 @@ H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "pixels_per_block is too large"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Always set K13 compression (and un-set CHIP compression) */ @@ -2973,7 +2973,7 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current fill value */ @@ -3156,7 +3156,7 @@ H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value /*out*/) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no fill value output buffer"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the fill value */ @@ -3255,7 +3255,7 @@ H5Pfill_value_defined(hid_t plist_id, H5D_fill_value_t *status) assert(status); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the fill-value status */ @@ -3292,7 +3292,7 @@ H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid allocation time setting"); /* Get the property list structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Check for resetting to default for layout type */ @@ -3375,7 +3375,7 @@ H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/) H5O_fill_t fill; /* Fill value property to query */ /* Get the property list structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve fill value settings */ @@ -3414,7 +3414,7 @@ H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fill time setting"); /* Get the property list structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve previous fill value settings */ @@ -3455,7 +3455,7 @@ H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/) H5O_fill_t fill; /* Fill value property to query */ /* Get the property list structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve fill value settings */ @@ -3497,7 +3497,7 @@ H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize /*out*/) if (NULL == minimize) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "receiving pointer cannot be NULL"); - plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE); + plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true); if (NULL == plist) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); @@ -3534,7 +3534,7 @@ H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize) FUNC_ENTER_API(FAIL) - plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE); + plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false); if (NULL == plist) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c index c986eb30142..c7ea00e4aa4 100644 --- a/src/H5Pdeprec.c +++ b/src/H5Pdeprec.c @@ -447,7 +447,7 @@ H5Pget_version(hid_t plist_id, unsigned *super /*out*/, unsigned *freelist /*out FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index 4fc27f6be96..28dbe54792b 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -974,7 +974,7 @@ H5Pset_data_transform(hid_t plist_id, const char *expression) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "expression cannot be NULL"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* See if a data transform is already set, and free it if it is */ @@ -1032,7 +1032,7 @@ H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_peek(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) @@ -1090,7 +1090,7 @@ H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer size must not be zero"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ @@ -1126,7 +1126,7 @@ H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/) FUNC_ENTER_API(0) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, 0, "can't find object for ID"); /* Return values */ @@ -1171,7 +1171,7 @@ H5Pset_preserve(hid_t plist_id, hbool_t status) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ @@ -1204,7 +1204,7 @@ H5Pget_preserve(hid_t plist_id) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ @@ -1243,7 +1243,7 @@ H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid value"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ @@ -1275,7 +1275,7 @@ H5Pget_edc_check(hid_t plist_id) FUNC_ENTER_API(H5Z_ERROR_EDC) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_ERROR_EDC, "can't find object for ID"); /* Update property list */ @@ -1307,7 +1307,7 @@ H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ @@ -1342,7 +1342,7 @@ H5Pset_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t op, void *operate_dat FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ @@ -1377,7 +1377,7 @@ H5Pget_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t *op /*out*/, void **o FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get property */ @@ -1414,7 +1414,7 @@ H5Pget_btree_ratios(hid_t plist_id, double *left /*out*/, double *middle /*out*/ FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the split ratios */ @@ -1464,7 +1464,7 @@ H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "split ratio must satisfy 0.0 <= X <= 1.0"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ @@ -1546,7 +1546,7 @@ H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_ FUNC_ENTER_API(FAIL) /* Check arguments */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Update property list */ @@ -1576,7 +1576,7 @@ H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func /*out*/, voi FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (alloc_func) @@ -1627,7 +1627,7 @@ H5Pset_hyper_vector_size(hid_t plist_id, size_t vector_size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "vector size too small"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ @@ -1656,7 +1656,7 @@ H5Pget_hyper_vector_size(hid_t plist_id, size_t *vector_size /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ @@ -1887,7 +1887,7 @@ H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ @@ -1918,7 +1918,7 @@ H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_ FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ @@ -1949,7 +1949,7 @@ H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_ca FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ @@ -2269,7 +2269,7 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper /* block is allowed to be NULL, and will be assumed to be all '1's when NULL */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* See if a dataset I/O selection is already set, and free it if it is */ @@ -2365,7 +2365,7 @@ H5Pset_selection_io(hid_t plist_id, H5D_selection_io_mode_t selection_io_mode) if (plist_id == H5P_DEFAULT) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Set the selection I/O mode */ @@ -2399,7 +2399,7 @@ H5Pget_selection_io(hid_t plist_id, H5D_selection_io_mode_t *selection_io_mode / FUNC_ENTER_API(FAIL) /* Check arguments */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Get the selection I/O mode */ @@ -2429,7 +2429,7 @@ H5Pget_no_selection_io_cause(hid_t plist_id, uint32_t *no_selection_io_cause /*o FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ @@ -2461,7 +2461,7 @@ H5Pget_actual_selection_io_mode(hid_t plist_id, uint32_t *actual_selection_io_mo FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ @@ -2561,7 +2561,7 @@ H5Pset_modify_write_buf(hid_t plist_id, hbool_t modify_write_buf) if (plist_id == H5P_DEFAULT) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Set the selection I/O mode */ @@ -2591,7 +2591,7 @@ H5Pget_modify_write_buf(hid_t plist_id, hbool_t *modify_write_buf /*out*/) FUNC_ENTER_API(FAIL) /* Check arguments */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Get the selection I/O mode */ diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index a498b99db0b..9c3e1a327f2 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -1086,7 +1086,7 @@ H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "alignment must be positive"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ @@ -1119,7 +1119,7 @@ H5Pget_alignment(hid_t fapl_id, hsize_t *threshold /*out*/, hsize_t *alignment / FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -1614,7 +1614,7 @@ H5Pget_driver_config_str(hid_t fapl_id, char *config_buf, size_t buf_size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "config_buf cannot be NULL if buf_size is non-zero"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't find object for ID"); /* Retrieve configuration string property */ @@ -2000,7 +2000,7 @@ H5Pset_family_offset(hid_t fapl_id, hsize_t offset) /* Get the plist structure */ if (H5P_DEFAULT == fapl_id) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ @@ -2034,7 +2034,7 @@ H5Pget_family_offset(hid_t fapl_id, hsize_t *offset /*out*/) /* Get the plist structure */ if (H5P_DEFAULT == fapl_id) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ @@ -2070,7 +2070,7 @@ H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type) /* Get the plist structure */ if (H5P_DEFAULT == fapl_id) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ @@ -2104,7 +2104,7 @@ H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type /*out*/) /* Get the plist structure */ if (H5P_DEFAULT == fapl_id) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list"); - if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ @@ -2151,7 +2151,7 @@ H5Pset_cache(hid_t plist_id, int H5_ATTR_UNUSED mdc_nelmts, size_t rdcc_nslots, "raw data cache w0 value must be between 0.0 and 1.0 inclusive"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set sizes */ @@ -2189,7 +2189,7 @@ H5Pget_cache(hid_t plist_id, int *mdc_nelmts, size_t *rdcc_nslots /*out*/, size_ FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get sizes */ @@ -2231,7 +2231,7 @@ H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* validate the new configuration */ @@ -2274,7 +2274,7 @@ H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config /*out* FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* validate the config ptr */ @@ -2315,7 +2315,7 @@ H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* validate the new configuration */ @@ -2358,7 +2358,7 @@ H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* validate the config ptr */ @@ -2410,7 +2410,7 @@ H5Pset_gc_references(hid_t plist_id, unsigned gc_ref) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ @@ -2440,7 +2440,7 @@ H5Pget_gc_references(hid_t plist_id, unsigned *gc_ref /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -2470,7 +2470,7 @@ H5Pset_fclose_degree(hid_t plist_id, H5F_close_degree_t degree) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ @@ -2499,7 +2499,7 @@ H5Pget_fclose_degree(hid_t plist_id, H5F_close_degree_t *degree /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (degree && H5P_get(plist, H5F_ACS_CLOSE_DEGREE_NAME, degree) < 0) @@ -2537,7 +2537,7 @@ H5Pset_meta_block_size(hid_t plist_id, hsize_t size) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ @@ -2567,7 +2567,7 @@ H5Pget_meta_block_size(hid_t plist_id, hsize_t *size /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -2608,7 +2608,7 @@ H5Pset_sieve_buf_size(hid_t plist_id, size_t size) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ @@ -2638,7 +2638,7 @@ H5Pget_sieve_buf_size(hid_t plist_id, size_t *size /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -2678,7 +2678,7 @@ H5Pset_small_data_block_size(hid_t plist_id, hsize_t size) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ @@ -2708,7 +2708,7 @@ H5Pget_small_data_block_size(hid_t plist_id, hsize_t *size /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -2845,7 +2845,7 @@ H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid (low,high) combination of library version bound"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ @@ -2876,7 +2876,7 @@ H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low /*out*/, H5F_libver_t *hi FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -2914,7 +2914,7 @@ H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ @@ -2947,7 +2947,7 @@ H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ @@ -2983,7 +2983,7 @@ H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "inconsistent buf_ptr and buf_len"); /* Get the plist structure */ - if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get old image info */ @@ -3072,7 +3072,7 @@ H5Pget_file_image(hid_t fapl_id, void **buf /*out*/, size_t *buf_len /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -3144,7 +3144,7 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get old info */ @@ -3223,7 +3223,7 @@ H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) + if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get old info */ @@ -4387,7 +4387,7 @@ H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts) "number of metadatata read attempts must be greater than 0"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ @@ -4419,7 +4419,7 @@ H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts /*out*/) H5P_genplist_t *plist; /* Property list pointer */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the # of read attempts set */ @@ -4460,7 +4460,7 @@ H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ @@ -4495,7 +4495,7 @@ H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func /*out*/, void **udat FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the callback function and user data */ @@ -4537,7 +4537,7 @@ H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "location cannot be NULL"); /* Get the property list structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list"); /* Make a copy of the passed-in location */ @@ -4576,7 +4576,7 @@ H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled /*out*/, char *locati FUNC_ENTER_API(FAIL) /* Get the property list structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list"); /* Get simple values */ @@ -5671,7 +5671,7 @@ H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_perc, FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (min_meta_perc > 100) @@ -5716,7 +5716,7 @@ H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size /*out*/, unsigned *min_ FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get size */ @@ -5829,7 +5829,7 @@ H5Pset_vol(hid_t plist_id, hid_t new_vol_id, const void *new_vol_info) FUNC_ENTER_API(FAIL) /* Check arguments */ - if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) + if (NULL == (plist = (H5P_genplist_t *)H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if (NULL == (connector = H5I_object_verify(new_vol_id, H5I_VOL))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file VOL ID"); @@ -6217,7 +6217,7 @@ H5Pset_relax_file_integrity_checks(hid_t plist_id, uint64_t flags) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags"); /* Get the property list structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list"); /* Set value */ @@ -6249,7 +6249,7 @@ H5Pget_relax_file_integrity_checks(hid_t plist_id, uint64_t *flags /*out*/) plist_id = H5P_FILE_ACCESS_DEFAULT; /* Get the property list structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list"); /* Get value */ diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c index c2f44dec615..efec3fd095b 100644 --- a/src/H5Pfcpl.c +++ b/src/H5Pfcpl.c @@ -330,7 +330,7 @@ H5Pset_userblock(hid_t plist_id, hsize_t size) } /* end if */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ @@ -362,7 +362,7 @@ H5Pget_userblock(hid_t plist_id, hsize_t *size /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ @@ -404,7 +404,7 @@ H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size) } /* end if */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ @@ -446,7 +446,7 @@ H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr /*out*/, size_t *sizeof_size /* FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -501,7 +501,7 @@ H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ @@ -545,7 +545,7 @@ H5Pget_sym_k(hid_t plist_id, unsigned *ik /*out*/, unsigned *lk /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -590,7 +590,7 @@ H5Pset_istore_k(hid_t plist_id, unsigned ik) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "istore IK value exceeds maximum B-tree entries"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ @@ -627,7 +627,7 @@ H5Pget_istore_k(hid_t plist_id, unsigned *ik /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ @@ -754,7 +754,7 @@ H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes) "number of indexes is greater than H5O_SHMESG_MAX_NINDEXES"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_set(plist, H5F_CRT_SHMSG_NINDEXES_NAME, &nindexes) < 0) @@ -783,7 +783,7 @@ H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_get(plist, H5F_CRT_SHMSG_NINDEXES_NAME, nindexes) < 0) @@ -823,7 +823,7 @@ H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "unrecognized flags in mesg_type_flags"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Read the current number of indexes */ @@ -878,7 +878,7 @@ H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Read the current number of indexes */ @@ -1118,7 +1118,7 @@ H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_ min_btree = 0; /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_set(plist, H5F_CRT_SHMSG_LIST_MAX_NAME, &max_list) < 0) @@ -1149,7 +1149,7 @@ H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list /*out*/, unsi FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value(s) */ @@ -1189,7 +1189,7 @@ H5Pset_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t strategy, hbool HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid strategy"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value(s), if non-zero */ @@ -1229,7 +1229,7 @@ H5Pget_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t *strategy /*out FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value(s) */ @@ -1331,7 +1331,7 @@ H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (fsp_size < H5F_FILE_SPACE_PAGE_SIZE_MIN) @@ -1367,7 +1367,7 @@ H5Pget_file_space_page_size(hid_t plist_id, hsize_t *fsp_size /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c index 657eecd95f6..3dcb4c6ebc3 100644 --- a/src/H5Pgcpl.c +++ b/src/H5Pgcpl.c @@ -151,7 +151,7 @@ H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ @@ -191,7 +191,7 @@ H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/) H5O_ginfo_t ginfo; /* Group information structure */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ @@ -239,7 +239,7 @@ H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min dense value must be < 65536"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get group info */ @@ -285,7 +285,7 @@ H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, unsigned H5O_ginfo_t ginfo; /* Group information structure */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get group info */ @@ -335,7 +335,7 @@ H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "est. name length must be < 65536"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get group info */ @@ -381,7 +381,7 @@ H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /*out*/, unsigned H5O_ginfo_t ginfo; /* Group information structure */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get group info */ @@ -421,7 +421,7 @@ H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tracking creation order is required for index"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get link info */ @@ -466,7 +466,7 @@ H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /*out*/) *crt_order_flags = 0; /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get link info */ diff --git a/src/H5Pint.c b/src/H5Pint.c index 3ff94a63d3d..2c7af8ee273 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -4084,6 +4084,40 @@ H5P_isa_class(hid_t plist_id, hid_t pclass_id) FUNC_LEAVE_NOAPI(ret_value) } /* H5P_isa_class() */ +/*------------------------------------------------------------------------- + * Function: H5P_is_default_plist + * + * Purpose: Determine if the provided ID refers to a default property list. + * + * Return: True if the ID refers to a default property list, false otherwise. + * + *------------------------------------------------------------------------- + */ +bool +H5P_is_default_plist(hid_t plist_id) +{ + hid_t H5I_def_plists[] = { + H5P_LST_FILE_CREATE_ID_g, H5P_LST_FILE_ACCESS_ID_g, H5P_LST_DATASET_CREATE_ID_g, + H5P_LST_DATASET_ACCESS_ID_g, H5P_LST_DATASET_XFER_ID_g, H5P_LST_FILE_MOUNT_ID_g, + H5P_LST_GROUP_CREATE_ID_g, H5P_LST_GROUP_ACCESS_ID_g, H5P_LST_DATATYPE_CREATE_ID_g, + H5P_LST_DATATYPE_ACCESS_ID_g, H5P_LST_MAP_CREATE_ID_g, H5P_LST_MAP_ACCESS_ID_g, + H5P_LST_ATTRIBUTE_CREATE_ID_g, H5P_LST_ATTRIBUTE_ACCESS_ID_g, H5P_LST_OBJECT_COPY_ID_g, + H5P_LST_LINK_CREATE_ID_g, H5P_LST_LINK_ACCESS_ID_g, H5P_LST_VOL_INITIALIZE_ID_g, + H5P_LST_REFERENCE_ACCESS_ID_g}; + + size_t num_default_plists = (size_t)(sizeof(H5I_def_plists) / sizeof(H5I_def_plists[0])); + + if (plist_id == H5P_DEFAULT) + return true; + + for (size_t i = 0; i < num_default_plists; i++) { + if (plist_id == H5I_def_plists[i]) + return true; + } + + return false; +} + /*-------------------------------------------------------------------------- NAME H5P_object_verify @@ -4091,9 +4125,10 @@ H5P_isa_class(hid_t plist_id, hid_t pclass_id) Internal routine to query whether a property list is a certain class and retrieve the property list object associated with it. USAGE - void *H5P_object_verify(plist_id, pclass_id) + void *H5P_object_verify(plist_id, pclass_id, allow_default) hid_t plist_id; IN: Property list to query hid_t pclass_id; IN: Property class to query + bool allow_default; IN: Whether to consider the default property lists valid RETURNS Success: valid pointer to a property list object Failure: NULL @@ -4113,7 +4148,7 @@ H5P_isa_class(hid_t plist_id, hid_t pclass_id) REVISION LOG --------------------------------------------------------------------------*/ H5P_genplist_t * -H5P_object_verify(hid_t plist_id, hid_t pclass_id) +H5P_object_verify(hid_t plist_id, hid_t pclass_id, bool allow_default) { H5P_genplist_t *ret_value = NULL; /* Return value */ @@ -4123,6 +4158,10 @@ H5P_object_verify(hid_t plist_id, hid_t pclass_id) if (H5P_isa_class(plist_id, pclass_id) != true) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, NULL, "property list is not a member of the class"); + if (!allow_default && H5P_is_default_plist(plist_id)) { + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, NULL, "property list is a default list"); + } + /* Get the plist structure */ if (NULL == (ret_value = (H5P_genplist_t *)H5I_object(plist_id))) HGOTO_ERROR(H5E_ID, H5E_BADID, NULL, "can't find object for ID"); diff --git a/src/H5Plapl.c b/src/H5Plapl.c index c6ca851e62c..bdb13bb4ddc 100644 --- a/src/H5Plapl.c +++ b/src/H5Plapl.c @@ -259,7 +259,7 @@ H5P__lacc_elink_fapl_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED if (l_fapl_id != H5P_DEFAULT) { H5P_genplist_t *l_fapl_plist; - if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS))) + if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list"); if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, false)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list"); @@ -298,7 +298,7 @@ H5P__lacc_elink_fapl_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED if (l_fapl_id != H5P_DEFAULT) { H5P_genplist_t *l_fapl_plist; - if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS))) + if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list"); if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, false)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list"); @@ -334,7 +334,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size) /* Check for non-default FAPL */ if (*elink_fapl != H5P_DEFAULT) { - if (NULL == (fapl_plist = (H5P_genplist_t *)H5P_object_verify(*elink_fapl, H5P_FILE_ACCESS))) + if (NULL == (fapl_plist = (H5P_genplist_t *)H5P_object_verify(*elink_fapl, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property list"); non_default_fapl = true; } /* end if */ @@ -492,7 +492,7 @@ H5P__lacc_elink_fapl_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED if (l_fapl_id != H5P_DEFAULT) { H5P_genplist_t *l_fapl_plist; - if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS))) + if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS, true))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list"); if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, false)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list"); @@ -861,7 +861,7 @@ H5Pset_nlinks(hid_t plist_id, size_t nlinks) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "number of links must be positive"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set number of links */ @@ -897,7 +897,7 @@ H5Pget_nlinks(hid_t plist_id, size_t *nlinks /*out*/) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer passed in"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current number of links */ @@ -928,7 +928,7 @@ H5Pset_elink_prefix(hid_t plist_id, const char *prefix) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set prefix */ @@ -963,7 +963,7 @@ H5Pget_elink_prefix(hid_t plist_id, char *prefix /*out*/, size_t size) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current prefix */ @@ -1008,7 +1008,7 @@ H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id) FUNC_ENTER_API(FAIL) /* Check arguments */ - if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, false))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link access property list"); /* Set the file access property list for the link access */ @@ -1038,7 +1038,7 @@ H5Pget_elink_fapl(hid_t lapl_id) FUNC_ENTER_API(H5I_INVALID_HID) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, H5I_INVALID_HID, "can't find object for ID"); if (H5P_get(plist, H5L_ACS_ELINK_FAPL_NAME, &ret_value) < 0) @@ -1074,7 +1074,7 @@ H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file open flags"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set flags */ @@ -1104,7 +1104,7 @@ H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get flags */ @@ -1142,7 +1142,7 @@ H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Populate the callback info struct */ @@ -1177,7 +1177,7 @@ H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func /*out*/, void **op_dat FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) + if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get callback_info */ diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c index 9afad0a278a..a2bebc85fa6 100644 --- a/src/H5Plcpl.c +++ b/src/H5Plcpl.c @@ -141,7 +141,7 @@ H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd_group) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ @@ -172,7 +172,7 @@ H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd_group /*out FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ diff --git a/src/H5Pmapl.c b/src/H5Pmapl.c index b3b9b776075..c10161cdb8a 100644 --- a/src/H5Pmapl.c +++ b/src/H5Pmapl.c @@ -156,7 +156,7 @@ H5Pset_map_iterate_hints(hid_t mapl_id, size_t key_prefetch_size, size_t key_all FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(mapl_id, H5P_MAP_ACCESS))) + if (NULL == (plist = H5P_object_verify(mapl_id, H5P_MAP_ACCESS, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set sizes */ @@ -187,7 +187,7 @@ H5Pget_map_iterate_hints(hid_t mapl_id, size_t *key_prefetch_size /*out*/, size_ FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(mapl_id, H5P_MAP_ACCESS))) + if (NULL == (plist = H5P_object_verify(mapl_id, H5P_MAP_ACCESS, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the properties */ diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 8605d0112c8..963cb2552db 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -214,7 +214,7 @@ H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min dense value must be < 65536"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set property values */ @@ -245,7 +245,7 @@ H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, unsigned FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -285,7 +285,7 @@ H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tracking creation order is required for index"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get object header flags */ @@ -335,7 +335,7 @@ H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags /*out*/) *crt_order_flags = 0; /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get object header flags */ @@ -384,7 +384,7 @@ H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get object header flags */ @@ -427,7 +427,7 @@ H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times /*out*/) uint8_t ohdr_flags; /* Object header flags */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get object header flags */ @@ -551,7 +551,7 @@ H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no client data values supplied"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Modify the filter parameters of the I/O pipeline */ @@ -609,7 +609,7 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no client data values supplied"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Call the private function */ @@ -709,7 +709,7 @@ H5Pget_nfilters(hid_t plist_id) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the pipeline property to query */ @@ -779,7 +779,7 @@ H5Pget_filter2(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, size_t } /* end if */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_FILTER_ERROR, "can't find object for ID"); /* Get the pipeline property to query */ @@ -903,7 +903,7 @@ H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out* } /* end if */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get filter information */ @@ -936,7 +936,7 @@ H5Pall_filters_avail(hid_t plist_id) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the pipeline property to query */ @@ -1003,7 +1003,7 @@ H5Premove_filter(hid_t plist_id, H5Z_filter_t filter) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the pipeline property to modify */ @@ -1054,7 +1054,7 @@ H5Pset_deflate(hid_t plist_id, unsigned level) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid deflate level"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the pipeline property to append to */ @@ -1093,7 +1093,7 @@ H5Pset_fletcher32(hid_t plist_id) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the pipeline property to append to */ @@ -1673,7 +1673,7 @@ H5Pget_filter1(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, size_t } /* end if */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_FILTER_ERROR, "can't find object for ID"); /* Get pipeline info */ @@ -1750,7 +1750,7 @@ H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out* } /* end if */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get filter info */ diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c index 622e35f416e..65aaca03ecb 100644 --- a/src/H5Pocpypl.c +++ b/src/H5Pocpypl.c @@ -616,7 +616,7 @@ H5Pset_copy_object(hid_t plist_id, unsigned cpy_option) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown option specified"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ @@ -646,7 +646,7 @@ H5Pget_copy_object(hid_t plist_id, unsigned *cpy_option /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ @@ -693,7 +693,7 @@ H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "path is empty string"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get dtype list */ @@ -745,7 +745,7 @@ H5Pfree_merge_committed_dtype_paths(hid_t plist_id) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get dtype list */ @@ -795,7 +795,7 @@ H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Populate the callback info struct */ @@ -835,7 +835,7 @@ H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func /*out*/, void * FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get callback info */ diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index b4abbc3b549..b471e6ce039 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -201,6 +201,7 @@ H5_DLL herr_t H5P_get_filter_by_id(H5P_genplist_t *plist, H5Z_filter_t id, unsig size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[], unsigned *filter_config); H5_DLL htri_t H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id); +H5_DLL bool H5P_is_default_plist(hid_t plist_id); /* Query internal fields of the property list struct */ H5_DLL hid_t H5P_get_plist_id(const H5P_genplist_t *plist); @@ -208,7 +209,7 @@ H5_DLL H5P_genclass_t *H5P_get_class(const H5P_genplist_t *plist); /* *SPECIAL* Don't make more of these! -QAK */ H5_DLL htri_t H5P_isa_class(hid_t plist_id, hid_t pclass_id); -H5_DLL H5P_genplist_t *H5P_object_verify(hid_t plist_id, hid_t pclass_id); +H5_DLL H5P_genplist_t *H5P_object_verify(hid_t plist_id, hid_t pclass_id, bool allow_default); /* Private DCPL routines */ H5_DLL herr_t H5P_fill_value_defined(H5P_genplist_t *plist, H5D_fill_value_t *status); diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c index 57543444239..254ed170896 100644 --- a/src/H5Pstrcpl.c +++ b/src/H5Pstrcpl.c @@ -146,7 +146,7 @@ H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "character encoding is not valid"); /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set the character encoding */ @@ -175,7 +175,7 @@ H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/) FUNC_ENTER_API(FAIL) /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE))) + if (NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE, true))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ diff --git a/src/H5VLnative_attr.c b/src/H5VLnative_attr.c index 7cc9c6a0f4b..c8514cf0d60 100644 --- a/src/H5VLnative_attr.c +++ b/src/H5VLnative_attr.c @@ -93,7 +93,7 @@ H5VL__native_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const c if (0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR)) HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, NULL, "no write intent on file"); - if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS))) + if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "AAPL is not an attribute access property list"); if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) @@ -154,7 +154,7 @@ H5VL__native_attr_open(void *obj, const H5VL_loc_params_t *loc_params, const cha if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object"); - if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS))) + if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS, true))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "AAPL is not an attribute access property list"); if (loc_params->type == H5VL_OBJECT_BY_SELF) { diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c index fb65458e7fd..415a67a7ead 100644 --- a/src/H5VLnative_dataset.c +++ b/src/H5VLnative_dataset.c @@ -133,7 +133,7 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi H5S_t *space; /* Dataspace to hold selection */ /* Get the plist structure */ - if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) + if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, true))) HGOTO_ERROR(H5E_DATASET, H5E_BADID, FAIL, "bad dataset transfer property list"); /* Get a pointer to the file space in the property list */ diff --git a/src/H5Z.c b/src/H5Z.c index 4ad75a6668c..2f9b5f1dc91 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -469,7 +469,7 @@ H5Z__check_unregister(hid_t ocpl_id, H5Z_filter_t filter_id) FUNC_ENTER_PACKAGE /* Get the plist structure of object creation */ - if (NULL == (plist = H5P_object_verify(ocpl_id, H5P_OBJECT_CREATE))) + if (NULL == (plist = H5P_object_verify(ocpl_id, H5P_OBJECT_CREATE, true))) HGOTO_ERROR(H5E_PLINE, H5E_BADID, FAIL, "can't find object for ID"); /* Check if the object creation property list uses the filter */ diff --git a/src/H5Znbit.c b/src/H5Znbit.c index f1ffd2480ec..fed86a1a3bd 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -825,7 +825,7 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for cd_values[]"); /* Get the plist structure */ - if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the filter's current parameters */ diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index 4330b4a6cb1..8121b3baf99 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -938,7 +938,7 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) FUNC_ENTER_PACKAGE /* Get the plist structure */ - if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get datatype */ diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index acc864f774c..8ee35f67afb 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -64,7 +64,7 @@ H5Z__set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_ FUNC_ENTER_PACKAGE /* Get the plist structure */ - if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get datatype */ diff --git a/src/H5Zszip.c b/src/H5Zszip.c index a5e961d3b6f..9b37035374f 100644 --- a/src/H5Zszip.c +++ b/src/H5Zszip.c @@ -130,7 +130,7 @@ H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id) FUNC_ENTER_PACKAGE /* Get the plist structure */ - if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) + if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get datatype */ diff --git a/test/tgenprop.c b/test/tgenprop.c index 8d8e39a5b79..4fa5f84e7af 100644 --- a/test/tgenprop.c +++ b/test/tgenprop.c @@ -1926,6 +1926,80 @@ test_genprop_refcount(void) } /* ent test_genprop_refcount() */ +/**************************************************************** +** +** test_set_default_plist_fail(): Test that the default property lists are unmodifiable +** +****************************************************************/ +static void +test_set_default_plist_fail(void) +{ + hid_t vol_id = H5I_INVALID_HID; + herr_t ret = FAIL; + + /* Output message about test being performed */ + MESSAGE(5, ("Testing that default property lists are unmodifiable\n")); + + /* Attempt to modify the default generic property list */ + H5E_BEGIN_TRY + { + ret = H5Pset_vol(H5P_DEFAULT, H5VL_NATIVE, NULL); + } + H5E_END_TRY + + VERIFY(ret, FAIL, "H5Pset_vol"); + + H5E_BEGIN_TRY + { + ret = H5Pset_userblock(H5P_FILE_CREATE_DEFAULT, 1024); + } + H5E_END_TRY + + VERIFY(ret, FAIL, "H5Pset_userblock"); + + H5E_BEGIN_TRY + { + ret = H5Pset_layout(H5P_DATASET_CREATE_DEFAULT, H5D_CONTIGUOUS); + } + H5E_END_TRY + + VERIFY(ret, FAIL, "H5Pset_layout"); + + H5E_BEGIN_TRY + { + ret = H5Pset_efile_prefix(H5P_DATASET_ACCESS_DEFAULT, "prefix"); + } + H5E_END_TRY + + VERIFY(ret, FAIL, "H5Pset_efile_prefix"); + + H5E_BEGIN_TRY + { + ret = H5Pset_vol(H5P_FILE_ACCESS_DEFAULT, vol_id, NULL); + } + H5E_END_TRY + + VERIFY(ret, FAIL, "H5Pset_vol"); + + H5E_BEGIN_TRY + { + ret = H5Pset_preserve(H5P_DATASET_XFER_DEFAULT, true); + } + H5E_END_TRY + + VERIFY(ret, FAIL, "H5Pset_preserve"); + + H5E_BEGIN_TRY + { + ret = H5Pset_local_heap_size_hint(H5P_GROUP_CREATE_DEFAULT, 0); + } + H5E_END_TRY + + VERIFY(ret, FAIL, "H5Pset_local_heap_size_hint"); + + return; +} + #ifndef H5_NO_DEPRECATED_SYMBOLS /**************************************************************** ** @@ -2167,6 +2241,8 @@ test_genprop(const void H5_ATTR_UNUSED *params) test_genprop_list_add_remove_prop(); /* Test adding and removing the same property several times to HDF5 property list */ + test_set_default_plist_fail(); /* Test that default property lists cannot be modified */ + test_genprop_equal(); /* Tests for more H5Pequal verification */ test_genprop_path(); /* Tests for class path verification */ test_genprop_refcount(); /* Tests for class reference counting */