summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5A.c4
-rw-r--r--src/H5AC.c70
-rw-r--r--src/H5ACpkg.h2
-rw-r--r--src/H5ACprivate.h2
-rw-r--r--src/H5D.c9
-rw-r--r--src/H5Dint.c2
-rw-r--r--src/H5Dpublic.h4
-rw-r--r--src/H5EA.c2
-rw-r--r--src/H5F.c4
-rw-r--r--src/H5FD.c22
-rw-r--r--src/H5FDint.c15
-rw-r--r--src/H5FDprivate.h5
-rw-r--r--src/H5Faccum.c57
-rw-r--r--src/H5Fsuper.c7
-rw-r--r--src/H5Fsuper_cache.c28
-rw-r--r--src/H5G.c2
-rw-r--r--src/H5Pacpl.c9
-rw-r--r--src/H5Pdapl.c11
-rw-r--r--src/H5Pdcpl.c11
-rw-r--r--src/H5Pdeprec.c1
-rw-r--r--src/H5Pdxpl.c9
-rw-r--r--src/H5Pencdec.c6
-rw-r--r--src/H5Pfapl.c17
-rw-r--r--src/H5Pfcpl.c9
-rw-r--r--src/H5Pfmpl.c10
-rw-r--r--src/H5Pgcpl.c11
-rw-r--r--src/H5Pint.c324
-rw-r--r--src/H5Plapl.c9
-rw-r--r--src/H5Plcpl.c9
-rw-r--r--src/H5Pocpl.c7
-rw-r--r--src/H5Pocpypl.c10
-rw-r--r--src/H5Ppkg.h15
-rw-r--r--src/H5Pprivate.h42
-rw-r--r--src/H5Ppublic.h124
-rw-r--r--src/H5Pstrcpl.c8
-rw-r--r--src/H5T.c15
-rw-r--r--src/H5Tcommit.c2
-rw-r--r--src/H5Zprivate.h2
38 files changed, 537 insertions, 359 deletions
diff --git a/src/H5A.c b/src/H5A.c
index cb8dfba..20d39eb 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1342,12 +1342,12 @@ H5Aget_create_plist(hid_t attr_id)
FUNC_ENTER_API(FAIL)
H5TRACE1("i", "i", attr_id);
- HDassert(H5P_LST_ATTRIBUTE_CREATE_g != -1);
+ HDassert(H5P_LST_ATTRIBUTE_CREATE_ID_g != -1);
/* Get attribute and default attribute creation property list*/
if(NULL == (attr = (H5A_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(H5P_LST_ATTRIBUTE_CREATE_g)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(H5P_LST_ATTRIBUTE_CREATE_ID_g)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get default ACPL")
/* Create the property list object to return */
diff --git a/src/H5AC.c b/src/H5AC.c
index 1a7d27b..d03cc88 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -114,6 +114,7 @@ static hid_t H5AC_noblock_dxpl_id=(-1);
/* Dataset transfer property list for independent metadata I/O calls */
/* (just "library internal" set - i.e. independent transfer mode) */
/* (Global variable definition, declaration is in H5ACprivate.h also) */
+H5P_genplist_t *H5AC_ind_dxpl_g = NULL;
hid_t H5AC_ind_dxpl_id=(-1);
@@ -165,8 +166,7 @@ static herr_t H5AC_log_moved_entry(const H5F_t * f,
haddr_t old_addr,
haddr_t new_addr);
-static herr_t H5AC_log_inserted_entry(H5F_t * f,
- H5AC_t * cache_ptr,
+static herr_t H5AC_log_inserted_entry(H5AC_t * cache_ptr,
H5AC_info_t * entry_ptr);
static herr_t H5AC_propagate_and_apply_candidate_list(H5F_t * f,
@@ -256,30 +256,25 @@ static herr_t
H5AC_init_interface(void)
{
#ifdef H5_HAVE_PARALLEL
- H5P_genclass_t *xfer_pclass; /* Dataset transfer property list class object */
H5P_genplist_t *xfer_plist; /* Dataset transfer property list object */
unsigned block_before_meta_write; /* "block before meta write" property value */
unsigned coll_meta_write; /* "collective metadata write" property value */
- unsigned library_internal=1; /* "library internal" property value */
- H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode property value */
- herr_t ret_value=SUCCEED; /* Return value */
+ unsigned library_internal = 1; /* "library internal" property value */
+#endif /* H5_HAVE_PARALLEL */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
+#ifdef H5_HAVE_PARALLEL
/* Sanity check */
- HDassert(H5P_CLS_DATASET_XFER_g!=(-1));
-
- /* Get the dataset transfer property list class object */
- if (NULL == (xfer_pclass = H5I_object(H5P_CLS_DATASET_XFER_g)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get property list class")
-
+ HDassert(H5P_CLS_DATASET_XFER_g != NULL);
/* Get an ID for the blocking, collective H5AC dxpl */
- if ((H5AC_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
+ if((H5AC_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
/* Get the property list object */
- if (NULL == (xfer_plist = H5I_object(H5AC_dxpl_id)))
+ if (NULL == (xfer_plist = (H5P_genplist_t *)H5I_object(H5AC_dxpl_id)))
HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
/* Insert 'block before metadata write' property */
@@ -301,11 +296,11 @@ H5AC_init_interface(void)
/* Get an ID for the non-blocking, collective H5AC dxpl */
- if ((H5AC_noblock_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
+ if((H5AC_noblock_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
/* Get the property list object */
- if (NULL == (xfer_plist = H5I_object(H5AC_noblock_dxpl_id)))
+ if (NULL == (xfer_plist = (H5P_genplist_t *)H5I_object(H5AC_noblock_dxpl_id)))
HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
/* Insert 'block before metadata write' property */
@@ -327,45 +322,45 @@ H5AC_init_interface(void)
/* Get an ID for the non-blocking, independent H5AC dxpl */
- if ((H5AC_ind_dxpl_id=H5P_create_id(xfer_pclass,FALSE)) < 0)
+ if((H5AC_ind_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
/* Get the property list object */
- if (NULL == (xfer_plist = H5I_object(H5AC_ind_dxpl_id)))
+ if(NULL == (H5AC_ind_dxpl_g = (H5P_genplist_t *)H5I_object(H5AC_ind_dxpl_id)))
HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
/* Insert 'block before metadata write' property */
block_before_meta_write=0;
- if(H5P_insert(xfer_plist,H5AC_BLOCK_BEFORE_META_WRITE_NAME,H5AC_BLOCK_BEFORE_META_WRITE_SIZE,&block_before_meta_write,
- NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
+ if(H5P_insert(H5AC_ind_dxpl_g, H5AC_BLOCK_BEFORE_META_WRITE_NAME, H5AC_BLOCK_BEFORE_META_WRITE_SIZE, &block_before_meta_write,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
/* Insert 'library internal' property */
- if(H5P_insert(xfer_plist,H5AC_LIBRARY_INTERNAL_NAME,H5AC_LIBRARY_INTERNAL_SIZE,&library_internal,
- NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
+ if(H5P_insert(H5AC_ind_dxpl_g, H5AC_LIBRARY_INTERNAL_NAME, H5AC_LIBRARY_INTERNAL_SIZE, &library_internal,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
/* Insert 'collective metadata write' property */
coll_meta_write = 0;
- if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
+ if(H5P_insert(H5AC_ind_dxpl_g, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-
#else /* H5_HAVE_PARALLEL */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
/* Sanity check */
- HDassert(H5P_LST_DATASET_XFER_g!=(-1));
+ HDassert(H5P_LST_DATASET_XFER_ID_g!=(-1));
H5AC_dxpl_id = H5P_DATASET_XFER_DEFAULT;
H5AC_noblock_dxpl_id = H5P_DATASET_XFER_DEFAULT;
H5AC_ind_dxpl_id = H5P_DATASET_XFER_DEFAULT;
- FUNC_LEAVE_NOAPI(SUCCEED)
+ /* Get the property list objects for the IDs */
+ if (NULL == (H5AC_ind_dxpl_g = (H5P_genplist_t *)H5I_object(H5AC_ind_dxpl_id)))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get property list object")
#endif /* H5_HAVE_PARALLEL */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5AC_init_interface() */
@@ -1013,7 +1008,7 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add
if(NULL != (aux_ptr = (H5AC_aux_t *)f->shared->cache->aux_ptr)) {
/* Log the new entry */
- if(H5AC_log_inserted_entry(f, f->shared->cache, (H5AC_info_t *)thing) < 0)
+ if(H5AC_log_inserted_entry(f->shared->cache, (H5AC_info_t *)thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5AC_log_inserted_entry() failed")
/* Check if we should try to flush */
@@ -1631,7 +1626,6 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
hbool_t dirtied;
hbool_t deleted;
#ifdef H5_HAVE_PARALLEL
- hbool_t size_changed = FALSE;
H5AC_aux_t * aux_ptr = NULL;
#endif /* H5_HAVE_PARALLEL */
#if H5AC__TRACE_FILE_ENABLED
@@ -1746,7 +1740,7 @@ H5AC_set_sync_point_done_callback(H5C_t * cache_ptr,
{
H5AC_aux_t * aux_ptr;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC));
@@ -1783,7 +1777,7 @@ H5AC_set_write_done_callback(H5C_t * cache_ptr,
{
H5AC_aux_t * aux_ptr;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(cache_ptr && (cache_ptr->magic == H5C__H5C_T_MAGIC));
@@ -2631,7 +2625,6 @@ H5AC_broadcast_candidate_list(H5AC_t * cache_ptr,
int * num_entries_ptr,
haddr_t ** haddr_buf_ptr_ptr)
{
- herr_t result;
hbool_t success = FALSE;
H5AC_aux_t * aux_ptr = NULL;
haddr_t * haddr_buf_ptr = NULL;
@@ -2801,7 +2794,7 @@ H5AC_broadcast_clean_list(H5AC_t * cache_ptr)
*/
if ( aux_ptr->sync_point_done != NULL ) {
- addr_buf_ptr = H5MM_malloc((size_t)(num_entries * sizeof(haddr_t)));
+ addr_buf_ptr = H5MM_malloc((size_t)num_entries * sizeof(haddr_t));
if ( addr_buf_ptr == NULL ) {
@@ -2899,7 +2892,7 @@ done:
if(buf_ptr != NULL)
buf_ptr = (MPI_Offset *)H5MM_xfree((void *)buf_ptr);
if(addr_buf_ptr != NULL)
- addr_buf_ptr = (MPI_Offset *)H5MM_xfree((void *)addr_buf_ptr);
+ addr_buf_ptr = (haddr_t *)H5MM_xfree((void *)addr_buf_ptr);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC_broadcast_clean_list() */
@@ -3633,8 +3626,7 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_inserted_entry(H5F_t * f,
- H5AC_t * cache_ptr,
+H5AC_log_inserted_entry(H5AC_t * cache_ptr,
H5AC_info_t * entry_ptr)
{
H5AC_aux_t * aux_ptr;
diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h
index 3060a70..ad768ef 100644
--- a/src/H5ACpkg.h
+++ b/src/H5ACpkg.h
@@ -70,8 +70,6 @@
#define H5AC__MAX_DIRTY_BYTES_THRESHOLD (int32_t) \
(H5C__MAX_MAX_CACHE_SIZE / 4)
-#define H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
- H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED
/****************************************************************************
*
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index a2224af..ca6dcbf 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -34,6 +34,7 @@
#include "H5private.h" /* Generic Functions */
#include "H5Cprivate.h" /* Cache */
#include "H5Fprivate.h" /* File access */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_METADATA_TRACE_FILE
#define H5AC__TRACE_FILE_ENABLED 1
@@ -222,6 +223,7 @@ extern hid_t H5AC_dxpl_id;
/* Dataset transfer property list for independent metadata I/O calls */
/* (just "library internal" set - i.e. independent transfer mode) */
/* (Global variable declaration, definition is in H5AC.c) */
+H5_DLLVAR H5P_genplist_t *H5AC_ind_dxpl_g;
H5_DLLVAR hid_t H5AC_ind_dxpl_id;
diff --git a/src/H5D.c b/src/H5D.c
index 3422b5a..11d8d40 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -781,7 +781,7 @@ H5Dget_access_plist(hid_t dset_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* Make a copy of the default dataset access property list */
- if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_ACCESS_g)))
+ if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_ACCESS_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
if ((new_dapl_id = H5P_copy_plist(old_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy dataset access property list")
@@ -1055,7 +1055,6 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
H5S_t *mspace = NULL; /* Memory dataspace */
char bogus; /* bogus value to pass to H5Diterate() */
H5S_t *space; /* Dataspace for iteration */
- H5P_genclass_t *pclass; /* Property class */
H5P_genplist_t *plist; /* Property list */
herr_t ret_value; /* Return value */
@@ -1092,12 +1091,8 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
if(NULL == (vlen_bufsize.vl_tbuf = H5FL_BLK_MALLOC(vlen_vl_buf, (size_t)1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "no temporary buffers available")
- /* Get the pointer to the dataset transfer class */
- if(NULL == (pclass = (H5P_genclass_t *)H5I_object(H5P_CLS_DATASET_XFER_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
-
/* Change to the custom memory allocation routines for reading VL data */
- if((vlen_bufsize.xfer_pid = H5P_create_id(pclass, FALSE)) < 0)
+ if((vlen_bufsize.xfer_pid = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "no dataset xfer plists available")
/* Get the property list struct */
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 753c5a4..9328e57 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -176,7 +176,7 @@ H5D__init_interface(void)
/* Get the default dataset creation property list values and initialize the
* default dataset with them.
*/
- if(NULL == (def_dcpl = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_CREATE_g)))
+ if(NULL == (def_dcpl = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_CREATE_ID_g)))
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get default dataset creation property list")
/* Get the default data storage layout */
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index 4309d64..e7ae3ae 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -30,9 +30,9 @@
/*****************/
/* Macros used to "unset" chunk cache configuration parameters */
-#define H5D_CHUNK_CACHE_NSLOTS_DEFAULT ((size_t) -1)
+#define H5D_CHUNK_CACHE_NSLOTS_DEFAULT ((size_t) -1)
#define H5D_CHUNK_CACHE_NBYTES_DEFAULT ((size_t) -1)
-#define H5D_CHUNK_CACHE_W0_DEFAULT -1.
+#define H5D_CHUNK_CACHE_W0_DEFAULT (-1.0f)
/* Property names for H5LTDdirect_chunk_write */
#define H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME "direct_chunk_flag"
diff --git a/src/H5EA.c b/src/H5EA.c
index c967517..b790590 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -48,7 +48,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5EApkg.h" /* Extensible Arrays */
#include "H5FLprivate.h" /* Free Lists */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
diff --git a/src/H5F.c b/src/H5F.c
index 7760be7..fb0133a 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -338,7 +338,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
HDassert(f);
/* Make a copy of the default file access property list */
- if(NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_g)))
+ if(NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
if((ret_value = H5P_copy_plist(old_plist, app_ref)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy file access property list")
@@ -2765,7 +2765,7 @@ H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len)
/* read in the file image */
/* (Note compensation for base address addition in internal routine) */
- if(H5FD_read(fd_ptr, H5AC_ind_dxpl_id, H5FD_MEM_DEFAULT, 0, space_needed, buf_ptr) < 0)
+ if(H5FD_read(fd_ptr, H5AC_ind_dxpl_g, H5FD_MEM_DEFAULT, 0, space_needed, buf_ptr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, FAIL, "file image read request failed")
} /* end if */
diff --git a/src/H5FD.c b/src/H5FD.c
index e672a74..be7f307 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -1652,15 +1652,14 @@ done:
* Programmer: Robb Matzke
* Thursday, July 29, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
void *buf/*out*/)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *dxpl; /* DXPL object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "*xMtiazx", file, type, dxpl_id, addr, size, buf);
@@ -1678,9 +1677,13 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size
if(!buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null result buffer")
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Do the real work */
/* (Note compensating for base address addition in internal routine) */
- if(H5FD_read(file, dxpl_id, type, addr - file->base_addr, size, buf) < 0)
+ if(H5FD_read(file, dxpl, type, addr - file->base_addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file read request failed")
done:
@@ -1703,15 +1706,14 @@ done:
* Programmer: Robb Matzke
* Thursday, July 29, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
const void *buf)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *dxpl; /* DXPL object */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "*xMtiaz*x", file, type, dxpl_id, addr, size, buf);
@@ -1728,9 +1730,13 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz
if(!buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null buffer")
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* The real work */
/* (Note compensating for base address addition in internal routine) */
- if(H5FD_write(file, dxpl_id, type, addr - file->base_addr, size, buf) < 0)
+ if(H5FD_write(file, dxpl, type, addr - file->base_addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file write request failed")
done:
diff --git a/src/H5FDint.c b/src/H5FDint.c
index c9e9a67..2d1fc09 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -42,7 +42,6 @@
#include "H5Fprivate.h" /* File access */
#include "H5FDpkg.h" /* File Drivers */
#include "H5Iprivate.h" /* IDs */
-#include "H5Pprivate.h" /* Property lists */
/****************/
@@ -117,7 +116,7 @@ H5FD_int_init_interface(void)
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_read(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
+H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr,
size_t size, void *buf/*out*/)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -125,8 +124,7 @@ H5FD_read(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
FUNC_ENTER_NOAPI(FAIL)
HDassert(file && file->cls);
- HDassert(H5I_GENPROP_LST == H5I_get_type(dxpl_id));
- HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
+ HDassert(TRUE == H5P_class_isa(H5P_CLASS(dxpl), H5P_CLS_DATASET_XFER_g));
HDassert(buf);
#ifndef H5_HAVE_PARALLEL
@@ -138,7 +136,7 @@ H5FD_read(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
#endif /* H5_HAVE_PARALLEL */
/* Dispatch to driver */
- if((file->cls->read)(file, type, dxpl_id, addr + file->base_addr, size, buf) < 0)
+ if((file->cls->read)(file, type, H5P_PLIST_ID(dxpl), addr + file->base_addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read request failed")
done:
@@ -160,7 +158,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_write(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
+H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr,
size_t size, const void *buf)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -168,8 +166,7 @@ H5FD_write(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
FUNC_ENTER_NOAPI(FAIL)
HDassert(file && file->cls);
- HDassert(H5I_GENPROP_LST == H5I_get_type(dxpl_id));
- HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
+ HDassert(TRUE == H5P_class_isa(H5P_CLASS(dxpl), H5P_CLS_DATASET_XFER_g));
HDassert(buf);
#ifndef H5_HAVE_PARALLEL
@@ -181,7 +178,7 @@ H5FD_write(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
#endif /* H5_HAVE_PARALLEL */
/* Dispatch to driver */
- if((file->cls->write)(file, type, dxpl_id, addr + file->base_addr, size, buf) < 0)
+ if((file->cls->write)(file, type, H5P_PLIST_ID(dxpl), addr + file->base_addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write request failed")
done:
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 6e4df22..6e64e62 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -24,6 +24,7 @@
#include "H5FDpublic.h"
/* Private headers needed by this file */
+#include "H5Pprivate.h" /* Property lists */
/*
* The MPI drivers are needed because there are
@@ -132,9 +133,9 @@ H5_DLL haddr_t H5FD_get_eof(const H5FD_t *file);
H5_DLL haddr_t H5FD_get_maxaddr(const H5FD_t *file);
H5_DLL herr_t H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags);
H5_DLL herr_t H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map);
-H5_DLL herr_t H5FD_read(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type,
+H5_DLL herr_t H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type,
haddr_t addr, size_t size, void *buf/*out*/);
-H5_DLL herr_t H5FD_write(H5FD_t *file, hid_t dxpl_id, H5FD_mem_t type,
+H5_DLL herr_t H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type,
haddr_t addr, size_t size, const void *buf);
H5_DLL herr_t H5FD_flush(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
H5_DLL herr_t H5FD_truncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index 037c085..ded7bad 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -40,7 +40,8 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
#include "H5FDprivate.h" /* File drivers */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5Iprivate.h" /* IDs */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
@@ -115,6 +116,7 @@ herr_t
H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
size_t size, void *buf/*out*/)
{
+ H5P_genplist_t *dxpl; /* DXPL object */
H5FD_mem_t map_type; /* Mapped memory type */
herr_t ret_value = SUCCEED; /* Return value */
@@ -127,6 +129,10 @@ H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
/* Treat global heap as raw data */
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Check if this information is in the metadata accumulator */
if((f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
if(size < H5F_ACCUM_MAX_SIZE) {
@@ -177,7 +183,7 @@ H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
f->shared->accum.dirty_off += amount_before;
/* Dispatch to driver */
- if(H5FD_read(f->shared->lf, dxpl_id, map_type, addr, amount_before, f->shared->accum.buf) < 0)
+ if(H5FD_read(f->shared->lf, dxpl, map_type, addr, amount_before, f->shared->accum.buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end if */
else
@@ -191,7 +197,7 @@ H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
H5_ASSIGN_OVERFLOW(amount_after, ((addr + size) - (f->shared->accum.loc + f->shared->accum.size)), hsize_t, size_t);
/* Dispatch to driver */
- if(H5FD_read(f->shared->lf, dxpl_id, map_type, (f->shared->accum.loc + f->shared->accum.size), amount_after, (f->shared->accum.buf + f->shared->accum.size + amount_before)) < 0)
+ if(H5FD_read(f->shared->lf, dxpl, map_type, (f->shared->accum.loc + f->shared->accum.size), amount_after, (f->shared->accum.buf + f->shared->accum.size + amount_before)) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end if */
@@ -205,13 +211,13 @@ H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
/* Current read doesn't overlap with metadata accumulator, read it from file */
else {
/* Dispatch to driver */
- if(H5FD_read(f->shared->lf, dxpl_id, map_type, addr, size, buf) < 0)
+ if(H5FD_read(f->shared->lf, dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end else */
} /* end if */
else {
/* Read the data */
- if(H5FD_read(f->shared->lf, dxpl_id, map_type, addr, size, buf) < 0)
+ if(H5FD_read(f->shared->lf, dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
/* Check for overlap w/dirty accumulator */
@@ -254,7 +260,7 @@ H5F_accum_read(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
} /* end if */
else {
/* Read the data */
- if(H5FD_read(f->shared->lf, dxpl_id, map_type, addr, size, buf) < 0)
+ if(H5FD_read(f->shared->lf, dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed")
} /* end else */
@@ -280,6 +286,7 @@ static herr_t
H5F_accum_adjust(H5F_meta_accum_t *accum, H5FD_t *lf, hid_t dxpl_id,
H5F_accum_adjust_t adjust, size_t size)
{
+ H5P_genplist_t *dxpl; /* DXPL object */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -290,6 +297,10 @@ H5F_accum_adjust(H5F_meta_accum_t *accum, H5FD_t *lf, hid_t dxpl_id,
HDassert(size > 0);
HDassert(size <= H5F_ACCUM_MAX_SIZE);
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Check if we need more buffer space */
if((size + accum->size) > accum->alloc_size) {
size_t new_size; /* New size of accumulator */
@@ -343,7 +354,7 @@ H5F_accum_adjust(H5F_meta_accum_t *accum, H5FD_t *lf, hid_t dxpl_id,
/* Check if the dirty region overlaps the region to eliminate from the accumulator */
if((accum->size - shrink_size) < (accum->dirty_off + accum->dirty_len)) {
/* Write out the dirty region from the metadata accumulator, with dispatch to driver */
- if(H5FD_write(lf, dxpl_id, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0)
+ if(H5FD_write(lf, dxpl, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset accumulator dirty flag */
@@ -354,7 +365,7 @@ H5F_accum_adjust(H5F_meta_accum_t *accum, H5FD_t *lf, hid_t dxpl_id,
/* Check if the dirty region overlaps the region to eliminate from the accumulator */
if(shrink_size > accum->dirty_off) {
/* Write out the dirty region from the metadata accumulator, with dispatch to driver */
- if(H5FD_write(lf, dxpl_id, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0)
+ if(H5FD_write(lf, dxpl, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset accumulator dirty flag */
@@ -419,6 +430,7 @@ herr_t
H5F_accum_write(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
size_t size, const void *buf)
{
+ H5P_genplist_t *dxpl; /* DXPL object */
H5FD_mem_t map_type; /* Mapped memory type */
herr_t ret_value = SUCCEED; /* Return value */
@@ -432,6 +444,10 @@ H5F_accum_write(const H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, haddr_t addr,
/* Treat global heap as raw data */
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Check for accumulating metadata */
if((f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && map_type != H5FD_MEM_DRAW) {
if(size < H5F_ACCUM_MAX_SIZE) {
@@ -636,7 +652,7 @@ HDmemset(f->shared->accum.buf + size, 0, (f->shared->accum.alloc_size - size));
else {
/* Write out the existing metadata accumulator, with dispatch to driver */
if(f->shared->accum.dirty) {
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_DEFAULT, f->shared->accum.loc + f->shared->accum.dirty_off, f->shared->accum.dirty_len, f->shared->accum.buf + f->shared->accum.dirty_off) < 0)
+ if(H5FD_write(f->shared->lf, dxpl, H5FD_MEM_DEFAULT, f->shared->accum.loc + f->shared->accum.dirty_off, f->shared->accum.dirty_len, f->shared->accum.buf + f->shared->accum.dirty_off) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset accumulator dirty flag */
@@ -727,7 +743,7 @@ HDmemset(f->shared->accum.buf + size, 0, (f->shared->accum.alloc_size - size));
} /* end if */
else {
/* Write the data */
- if(H5FD_write(f->shared->lf, dxpl_id, map_type, addr, size, buf) < 0)
+ if(H5FD_write(f->shared->lf, dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
/* Check for overlap w/accumulator */
@@ -812,7 +828,7 @@ HDmemset(f->shared->accum.buf + size, 0, (f->shared->accum.alloc_size - size));
} /* end if */
else {
/* Write the data */
- if(H5FD_write(f->shared->lf, dxpl_id, map_type, addr, size, buf) < 0)
+ if(H5FD_write(f->shared->lf, dxpl, map_type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end else */
@@ -839,6 +855,7 @@ herr_t
H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
hsize_t size)
{
+ H5P_genplist_t *dxpl; /* DXPL object */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -846,6 +863,10 @@ H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
/* check arguments */
HDassert(f);
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Adjust the metadata accumulator to remove the freed block, if it overlaps */
if((f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA)
&& H5F_addr_overlap(addr, size, f->shared->accum.loc, f->shared->accum.size)) {
@@ -918,7 +939,7 @@ H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
/* Check if block to free is entirely before dirty region */
if(H5F_addr_le(tail_addr, dirty_start)) {
/* Write out the entire dirty region of the accumulator */
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_DEFAULT, dirty_start, f->shared->accum.dirty_len, f->shared->accum.buf + f->shared->accum.dirty_off) < 0)
+ if(H5FD_write(f->shared->lf, dxpl, H5FD_MEM_DEFAULT, dirty_start, f->shared->accum.dirty_len, f->shared->accum.buf + f->shared->accum.dirty_off) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end if */
/* Block to free overlaps with some/all of dirty region */
@@ -933,7 +954,7 @@ H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
HDassert(write_size > 0);
/* Write out the unfreed dirty region of the accumulator */
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, f->shared->accum.buf + f->shared->accum.dirty_off + dirty_delta) < 0)
+ if(H5FD_write(f->shared->lf, dxpl, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, f->shared->accum.buf + f->shared->accum.dirty_off + dirty_delta) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end if */
@@ -953,7 +974,7 @@ H5F_accum_free(H5F_t *f, hid_t dxpl_id, H5FD_mem_t UNUSED type, haddr_t addr,
HDassert(write_size > 0);
/* Write out the unfreed end of the dirty region of the accumulator */
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, f->shared->accum.buf + f->shared->accum.dirty_off + dirty_delta) < 0)
+ if(H5FD_write(f->shared->lf, dxpl, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, f->shared->accum.buf + f->shared->accum.dirty_off + dirty_delta) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
} /* end if */
@@ -1005,8 +1026,14 @@ H5F_accum_flush(const H5F_t *f, hid_t dxpl_id)
/* Check if we need to flush out the metadata accumulator */
if((f->shared->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) && f->shared->accum.dirty) {
+ H5P_genplist_t *dxpl; /* DXPL object */
+
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Flush the metadata contents */
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_DEFAULT, f->shared->accum.loc + f->shared->accum.dirty_off, f->shared->accum.dirty_len, f->shared->accum.buf + f->shared->accum.dirty_off) < 0)
+ if(H5FD_write(f->shared->lf, dxpl, H5FD_MEM_DEFAULT, f->shared->accum.loc + f->shared->accum.dirty_off, f->shared->accum.dirty_len, f->shared->accum.buf + f->shared->accum.dirty_off) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed")
/* Reset the dirty flag */
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index a1c67ec..81aaca2 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -117,6 +117,7 @@ H5F_init_super_interface(void)
herr_t
H5F_locate_signature(H5FD_t *file, hid_t dxpl_id, haddr_t *sig_addr)
{
+ H5P_genplist_t *dxpl; /* DXPL object */
haddr_t addr, eoa;
uint8_t buf[H5F_SIGNATURE_LEN];
unsigned n, maxpow;
@@ -131,6 +132,10 @@ H5F_locate_signature(H5FD_t *file, hid_t dxpl_id, haddr_t *sig_addr)
addr >>= 1;
maxpow = MAX(maxpow, 9);
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/*
* Search for the file signature at format address zero followed by
* powers of two larger than 9.
@@ -139,7 +144,7 @@ H5F_locate_signature(H5FD_t *file, hid_t dxpl_id, haddr_t *sig_addr)
addr = (8 == n) ? 0 : (haddr_t)1 << n;
if(H5FD_set_eoa(file, H5FD_MEM_SUPER, addr + H5F_SIGNATURE_LEN) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to set EOA value for file signature")
- if(H5FD_read(file, dxpl_id, H5FD_MEM_SUPER, addr, (size_t)H5F_SIGNATURE_LEN, buf) < 0)
+ if(H5FD_read(file, dxpl, H5FD_MEM_SUPER, addr, (size_t)H5F_SIGNATURE_LEN, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to read file signature")
if(!HDmemcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN))
break;
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 48fd139..45fad37 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -116,6 +116,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
H5F_super_t *sblock = NULL; /* File's superblock */
haddr_t base_addr = HADDR_UNDEF; /* Base address of file */
uint8_t sbuf[H5F_MAX_SUPERBLOCK_SIZE]; /* Buffer for superblock */
+ H5P_genplist_t *dxpl; /* DXPL object */
H5P_genplist_t *c_plist; /* File creation property list */
H5F_file_t *shared; /* shared part of `file' */
H5FD_t *lf; /* file driver part of `shared' */
@@ -159,12 +160,16 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
sblock->cache_info.flush_me_collectively = TRUE;
#endif
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get property list")
+
/* Read fixed-size portion of the superblock */
p = sbuf;
H5_CHECK_OVERFLOW(fixed_size, size_t, haddr_t);
if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)fixed_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl_id, H5FD_MEM_SUPER, (haddr_t)0, fixed_size, p) < 0)
+ if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, fixed_size, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock")
/* Skip over signature (already checked when locating the superblock) */
@@ -191,7 +196,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
/* Read in variable-sized portion of superblock */
if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)(fixed_size + variable_size)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl_id, H5FD_MEM_SUPER, (haddr_t)fixed_size, variable_size, p) < 0)
+ if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)fixed_size, variable_size, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read superblock")
/* Check for older version of superblock format */
@@ -345,7 +350,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
p = dbuf;
if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl_id, H5FD_MEM_SUPER, sblock->driver_addr, (size_t)H5F_DRVINFOBLOCK_HDR_SIZE, p) < 0)
+ if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, sblock->driver_addr, (size_t)H5F_DRVINFOBLOCK_HDR_SIZE, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read driver information block")
/* Version number */
@@ -377,7 +382,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
/* Read in variable-sized portion of driver info block */
if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE + drv_variable_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
- if(H5FD_read(lf, dxpl_id, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE, drv_variable_size, p) < 0)
+ if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE, drv_variable_size, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read file driver information")
/* Decode driver information */
@@ -655,11 +660,12 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr,
#endif
if(sblock->cache_info.is_dirty) {
+ H5P_genplist_t *dxpl; /* DXPL object */
uint8_t buf[H5F_MAX_SUPERBLOCK_SIZE + H5F_MAX_DRVINFOBLOCK_SIZE]; /* Superblock & driver info blockencoding buffer */
- uint8_t *p; /* Ptr into encoding buffer */
- haddr_t rel_eoa; /* Relative EOA for file */
- size_t superblock_size; /* Size of superblock, in bytes */
- size_t driver_size; /* Size of driver info block (bytes)*/
+ uint8_t *p; /* Ptr into encoding buffer */
+ haddr_t rel_eoa; /* Relative EOA for file */
+ size_t superblock_size; /* Size of superblock, in bytes */
+ size_t driver_size; /* Size of driver info block (bytes)*/
/* Encode the common portion of the file superblock for all versions */
p = buf;
@@ -783,9 +789,13 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr,
/* Double check we didn't overrun the block (unlikely) */
HDassert(superblock_size <= sizeof(buf));
+ /* Get the DXPL plist object for DXPL ID */
+ if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
+
/* Write superblock */
/* (always at relative address 0) */
- if(H5FD_write(f->shared->lf, dxpl_id, H5FD_MEM_SUPER, (haddr_t)0, superblock_size, buf) < 0)
+ if(H5FD_write(f->shared->lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, superblock_size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write superblock")
/* Check for newer version of superblock format & superblock extension */
diff --git a/src/H5G.c b/src/H5G.c
index b31bc5d..7c2dc9c 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -546,7 +546,7 @@ H5G_get_create_plist(H5G_t *grp)
FUNC_ENTER_NOAPI(FAIL)
/* Copy the default group creation property list */
- if(NULL == (gcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_GROUP_CREATE_g)))
+ if(NULL == (gcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_GROUP_CREATE_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get default group creation property list")
if((new_gcpl_id = H5P_copy_plist(gcpl_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to copy the creation property list")
diff --git a/src/H5Pacpl.c b/src/H5Pacpl.c
index b30bf1e..0a0641c 100644
--- a/src/H5Pacpl.c
+++ b/src/H5Pacpl.c
@@ -65,10 +65,13 @@
const H5P_libclass_t H5P_CLS_ACRT[1] = {{
"attribute create", /* Class name for debugging */
H5P_TYPE_ATTRIBUTE_CREATE, /* Class type */
- &H5P_CLS_STRING_CREATE_g, /* Parent class ID */
- &H5P_CLS_ATTRIBUTE_CREATE_g, /* Pointer to class ID */
- &H5P_LST_ATTRIBUTE_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_STRING_CREATE_g, /* Parent class */
+ &H5P_CLS_ATTRIBUTE_CREATE_g, /* Pointer to class */
+ &H5P_CLS_ATTRIBUTE_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_ATTRIBUTE_CREATE_ID_g, /* Pointer to default property list ID */
NULL, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index 5239fba..93d16bb 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -88,10 +88,13 @@ static herr_t H5P__dacc_reg_prop(H5P_genclass_t *pclass);
const H5P_libclass_t H5P_CLS_DACC[1] = {{
"dataset access", /* Class name for debugging */
H5P_TYPE_DATASET_ACCESS, /* Class type */
- &H5P_CLS_LINK_ACCESS_g, /* Parent class ID */
- &H5P_CLS_DATASET_ACCESS_g, /* Pointer to class ID */
- &H5P_LST_DATASET_ACCESS_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_LINK_ACCESS_g, /* Parent class */
+ &H5P_CLS_DATASET_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_DATASET_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_DATASET_ACCESS_ID_g, /* Pointer to default property list ID */
H5P__dacc_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -195,7 +198,7 @@ H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double
/* Check arguments. Note that we allow negative values - they are
* considered to "unset" the property. */
- if(rdcc_w0 > 1.0)
+ if(rdcc_w0 > (double)1.0f)
HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "raw data cache w0 value must be between 0.0 and 1.0 inclusive, or H5D_CHUNK_CACHE_W0_DEFAULT");
/* Get the plist structure */
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index e029da3..a753209 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -144,10 +144,13 @@ static int H5P__dcrt_ext_file_list_cmp(const void *value1, const void *value2, s
const H5P_libclass_t H5P_CLS_DCRT[1] = {{
"dataset create", /* Class name for debugging */
H5P_TYPE_DATASET_CREATE, /* Class type */
- &H5P_CLS_OBJECT_CREATE_g, /* Parent class ID */
- &H5P_CLS_DATASET_CREATE_g, /* Pointer to class ID */
- &H5P_LST_DATASET_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_OBJECT_CREATE_g, /* Parent class */
+ &H5P_CLS_DATASET_CREATE_g, /* Pointer to class */
+ &H5P_CLS_DATASET_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_DATASET_CREATE_ID_g, /* Pointer to default property list ID */
H5P__dcrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
H5P__dcrt_copy, /* Class copy callback */
@@ -2006,7 +2009,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5P_get_fill_value(H5P_genplist_t *plist, H5T_t *type, void *value/*out*/,
+H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value/*out*/,
hid_t dxpl_id)
{
H5O_fill_t fill; /* Fill value to retrieve */
diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c
index 45b1d09..e4e91ac 100644
--- a/src/H5Pdeprec.c
+++ b/src/H5Pdeprec.c
@@ -42,6 +42,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
#include "H5Iprivate.h" /* IDs */
#include "H5Ppkg.h" /* Property lists */
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 472700a..ab96c4e 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -214,10 +214,13 @@ static herr_t H5P__dxfr_xform_close(const char* name, size_t size, void* value);
const H5P_libclass_t H5P_CLS_DXFR[1] = {{
"data transfer", /* Class name for debugging */
H5P_TYPE_DATASET_XFER, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_DATASET_XFER_g, /* Pointer to class ID */
- &H5P_LST_DATASET_XFER_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_DATASET_XFER_g, /* Pointer to class */
+ &H5P_CLS_DATASET_XFER_ID_g, /* Pointer to class ID */
+ &H5P_LST_DATASET_XFER_ID_g, /* Pointer to default property list ID */
H5P__dxfr_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c
index 0c70c6c..3285ae3 100644
--- a/src/H5Pencdec.c
+++ b/src/H5Pencdec.c
@@ -24,8 +24,10 @@
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
+#ifdef NOT_YET
/* Interface initialization */
#define H5_INTERFACE_INIT_FUNC H5P_init_encdec_interface
+#endif /* NOT_YET */
/***********/
@@ -33,9 +35,11 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Ppkg.h" /* Property lists */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
@@ -78,6 +82,7 @@ typedef struct {
/*******************/
+#ifdef NOT_YET
/*--------------------------------------------------------------------------
NAME
@@ -98,6 +103,7 @@ H5P_init_encdec_interface(void)
FUNC_LEAVE_NOAPI(H5P_init())
} /* H5P_init_encdec_interface() */
+#endif /* NOT_YET */
/*-------------------------------------------------------------------------
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index c217acb..83e0a0f 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -37,17 +37,17 @@
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* Files */
+#include "H5Fprivate.h" /* Files */
#include "H5FDprivate.h" /* File drivers */
#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory Management */
+#include "H5MMprivate.h" /* Memory Management */
#include "H5Ppkg.h" /* Property lists */
/* Includes needed to set as default file driver */
#include "H5FDsec2.h" /* Posix unbuffered I/O file driver */
#include "H5FDstdio.h" /* Standard C buffered I/O */
#ifdef H5_HAVE_WINDOWS
-#include "H5FDwindows.h" /* Windows buffered I/O */
+#include "H5FDwindows.h" /* Windows buffered I/O */
#endif
@@ -213,10 +213,13 @@ static herr_t H5P__facc_multi_type_dec(const void **_pp, void *value);
const H5P_libclass_t H5P_CLS_FACC[1] = {{
"file access", /* Class name for debugging */
H5P_TYPE_FILE_ACCESS, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_FILE_ACCESS_g, /* Pointer to class ID */
- &H5P_LST_FILE_ACCESS_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_FILE_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_FILE_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_FILE_ACCESS_ID_g, /* Pointer to default property list ID */
H5P_facc_reg_prop, /* Default property registration routine */
+
H5P_facc_create, /* Class creation callback */
NULL, /* Class creation callback info */
H5P_facc_copy, /* Class copy callback */
@@ -1124,7 +1127,7 @@ H5Pset_cache(hid_t plist_id, int UNUSED mdc_nelmts,
rdcc_w0);
/* Check arguments */
- if(rdcc_w0 < 0.0 || rdcc_w0 > 1.0)
+ if(rdcc_w0 < (double)0.0f || rdcc_w0 > (double)1.0f)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "raw data cache w0 value must be between 0.0 and 1.0 inclusive")
/* Get the plist structure */
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index 3eb9c5b..aca589c 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -140,10 +140,13 @@ static herr_t H5P__fcrt_shmsg_index_minsize_dec(const void **_pp, void *value);
const H5P_libclass_t H5P_CLS_FCRT[1] = {{
"file create", /* Class name for debugging */
H5P_TYPE_FILE_CREATE, /* Class type */
- &H5P_CLS_GROUP_CREATE_g, /* Parent class ID */
- &H5P_CLS_FILE_CREATE_g, /* Pointer to class ID */
- &H5P_LST_FILE_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_GROUP_CREATE_g, /* Parent class */
+ &H5P_CLS_FILE_CREATE_g, /* Pointer to class */
+ &H5P_CLS_FILE_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_FILE_CREATE_ID_g, /* Pointer to default property list ID */
H5P_fcrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pfmpl.c b/src/H5Pfmpl.c
index 1c4d3f4..875f101 100644
--- a/src/H5Pfmpl.c
+++ b/src/H5Pfmpl.c
@@ -35,6 +35,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
#include "H5Iprivate.h" /* IDs */
#include "H5Ppkg.h" /* Property lists */
@@ -75,10 +76,13 @@ static herr_t H5P_fmnt_reg_prop(H5P_genclass_t *pclass);
const H5P_libclass_t H5P_CLS_FMNT[1] = {{
"file mount", /* Class name for debugging */
H5P_TYPE_FILE_MOUNT, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_FILE_MOUNT_g, /* Pointer to class ID */
- &H5P_LST_FILE_MOUNT_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_FILE_MOUNT_g, /* Pointer to class */
+ &H5P_CLS_FILE_MOUNT_ID_g, /* Pointer to class ID */
+ &H5P_LST_FILE_MOUNT_ID_g, /* Pointer to default property list ID */
H5P_fmnt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 0210700..b7d5106 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -34,7 +34,9 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Gprivate.h" /* Groups */
#include "H5Iprivate.h" /* IDs */
+#include "H5Oprivate.h" /* Object headers */
#include "H5Ppkg.h" /* Property lists */
@@ -81,10 +83,13 @@ static herr_t H5P__gcrt_link_info_dec(const void **_pp, void *value);
const H5P_libclass_t H5P_CLS_GCRT[1] = {{
"group create", /* Class name for debugging */
H5P_TYPE_GROUP_CREATE, /* Class type */
- &H5P_CLS_OBJECT_CREATE_g, /* Parent class ID */
- &H5P_CLS_GROUP_CREATE_g, /* Pointer to class ID */
- &H5P_LST_GROUP_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_OBJECT_CREATE_g, /* Parent class */
+ &H5P_CLS_GROUP_CREATE_g, /* Pointer to class */
+ &H5P_CLS_GROUP_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_GROUP_CREATE_ID_g, /* Pointer to default property list ID */
H5P__gcrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 6f57e78..1545b6a 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -98,51 +98,71 @@ static int H5P_cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2);
* Predefined property list classes. These are initialized at runtime by
* H5P_init_interface() in this source file.
*/
-hid_t H5P_CLS_ROOT_g = FAIL;
-hid_t H5P_CLS_OBJECT_CREATE_g = FAIL;
-hid_t H5P_CLS_FILE_CREATE_g = FAIL;
-hid_t H5P_CLS_FILE_ACCESS_g = FAIL;
-hid_t H5P_CLS_DATASET_CREATE_g = FAIL;
-hid_t H5P_CLS_DATASET_ACCESS_g = FAIL;
-hid_t H5P_CLS_DATASET_XFER_g = FAIL;
-hid_t H5P_CLS_FILE_MOUNT_g = FAIL;
-hid_t H5P_CLS_GROUP_CREATE_g = FAIL;
-hid_t H5P_CLS_GROUP_ACCESS_g = FAIL;
-hid_t H5P_CLS_DATATYPE_CREATE_g = FAIL;
-hid_t H5P_CLS_DATATYPE_ACCESS_g = FAIL;
-hid_t H5P_CLS_ATTRIBUTE_CREATE_g = FAIL;
-hid_t H5P_CLS_OBJECT_COPY_g = FAIL;
-hid_t H5P_CLS_LINK_CREATE_g = FAIL;
-hid_t H5P_CLS_LINK_ACCESS_g = FAIL;
-hid_t H5P_CLS_STRING_CREATE_g = FAIL;
+hid_t H5P_CLS_ROOT_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_ROOT_g = NULL;
+hid_t H5P_CLS_OBJECT_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_OBJECT_CREATE_g = NULL;
+hid_t H5P_CLS_FILE_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_FILE_CREATE_g = NULL;
+hid_t H5P_CLS_FILE_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_FILE_ACCESS_g = NULL;
+hid_t H5P_CLS_DATASET_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_DATASET_CREATE_g = NULL;
+hid_t H5P_CLS_DATASET_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_DATASET_ACCESS_g = NULL;
+hid_t H5P_CLS_DATASET_XFER_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_DATASET_XFER_g = NULL;
+hid_t H5P_CLS_FILE_MOUNT_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_FILE_MOUNT_g = NULL;
+hid_t H5P_CLS_GROUP_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_GROUP_CREATE_g = NULL;
+hid_t H5P_CLS_GROUP_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_GROUP_ACCESS_g = NULL;
+hid_t H5P_CLS_DATATYPE_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_DATATYPE_CREATE_g = NULL;
+hid_t H5P_CLS_DATATYPE_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_DATATYPE_ACCESS_g = NULL;
+hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_ATTRIBUTE_CREATE_g = NULL;
+hid_t H5P_CLS_OBJECT_COPY_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_OBJECT_COPY_g = NULL;
+hid_t H5P_CLS_LINK_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_LINK_CREATE_g = NULL;
+hid_t H5P_CLS_LINK_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_LINK_ACCESS_g = NULL;
+hid_t H5P_CLS_STRING_CREATE_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_STRING_CREATE_g = NULL;
/*
* Predefined property lists for each predefined class. These are initialized
* at runtime by H5P_init_interface() in this source file.
*/
-hid_t H5P_LST_FILE_CREATE_g = FAIL;
-hid_t H5P_LST_FILE_ACCESS_g = FAIL;
-hid_t H5P_LST_DATASET_CREATE_g = FAIL;
-hid_t H5P_LST_DATASET_ACCESS_g = FAIL;
-hid_t H5P_LST_DATASET_XFER_g = FAIL;
-hid_t H5P_LST_FILE_MOUNT_g = FAIL;
-hid_t H5P_LST_GROUP_CREATE_g = FAIL;
-hid_t H5P_LST_GROUP_ACCESS_g = FAIL;
-hid_t H5P_LST_DATATYPE_CREATE_g = FAIL;
-hid_t H5P_LST_DATATYPE_ACCESS_g = FAIL;
-hid_t H5P_LST_ATTRIBUTE_CREATE_g = FAIL;
-hid_t H5P_LST_OBJECT_COPY_g = FAIL;
-hid_t H5P_LST_LINK_CREATE_g = FAIL;
-hid_t H5P_LST_LINK_ACCESS_g = FAIL;
+hid_t H5P_LST_FILE_CREATE_ID_g = FAIL;
+hid_t H5P_LST_FILE_ACCESS_ID_g = FAIL;
+hid_t H5P_LST_DATASET_CREATE_ID_g = FAIL;
+hid_t H5P_LST_DATASET_ACCESS_ID_g = FAIL;
+hid_t H5P_LST_DATASET_XFER_ID_g = FAIL;
+hid_t H5P_LST_FILE_MOUNT_ID_g = FAIL;
+hid_t H5P_LST_GROUP_CREATE_ID_g = FAIL;
+hid_t H5P_LST_GROUP_ACCESS_ID_g = FAIL;
+hid_t H5P_LST_DATATYPE_CREATE_ID_g = FAIL;
+hid_t H5P_LST_DATATYPE_ACCESS_ID_g = FAIL;
+hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g = FAIL;
+hid_t H5P_LST_OBJECT_COPY_ID_g = FAIL;
+hid_t H5P_LST_LINK_CREATE_ID_g = FAIL;
+hid_t H5P_LST_LINK_ACCESS_ID_g = FAIL;
/* Root property list class library initialization object */
const H5P_libclass_t H5P_CLS_ROOT[1] = {{
"root", /* Class name for debugging */
H5P_TYPE_ROOT, /* Class type */
- NULL, /* Parent class ID */
- &H5P_CLS_ROOT_g, /* Pointer to class ID */
+
+ NULL, /* Parent class */
+ &H5P_CLS_ROOT_g, /* Pointer to class */
+ &H5P_CLS_ROOT_ID_g, /* Pointer to class ID */
NULL, /* Pointer to default property list ID */
NULL, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -156,10 +176,13 @@ const H5P_libclass_t H5P_CLS_ROOT[1] = {{
const H5P_libclass_t H5P_CLS_GACC[1] = {{
"group access", /* Class name for debugging */
H5P_TYPE_GROUP_ACCESS, /* Class type */
- &H5P_CLS_LINK_ACCESS_g, /* Parent class ID */
- &H5P_CLS_GROUP_ACCESS_g, /* Pointer to class ID */
- &H5P_LST_GROUP_ACCESS_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_LINK_ACCESS_g, /* Parent class */
+ &H5P_CLS_GROUP_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_GROUP_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_GROUP_ACCESS_ID_g, /* Pointer to default property list ID */
NULL, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -173,10 +196,13 @@ const H5P_libclass_t H5P_CLS_GACC[1] = {{
const H5P_libclass_t H5P_CLS_TCRT[1] = {{
"datatype create", /* Class name for debugging */
H5P_TYPE_DATATYPE_CREATE, /* Class type */
- &H5P_CLS_OBJECT_CREATE_g, /* Parent class ID */
- &H5P_CLS_DATATYPE_CREATE_g, /* Pointer to class ID */
- &H5P_LST_DATATYPE_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_OBJECT_CREATE_g, /* Parent class */
+ &H5P_CLS_DATATYPE_CREATE_g, /* Pointer to class */
+ &H5P_CLS_DATATYPE_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_DATATYPE_CREATE_ID_g, /* Pointer to default property list ID */
NULL, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -190,10 +216,13 @@ const H5P_libclass_t H5P_CLS_TCRT[1] = {{
const H5P_libclass_t H5P_CLS_TACC[1] = {{
"datatype access", /* Class name for debugging */
H5P_TYPE_DATATYPE_ACCESS, /* Class type */
- &H5P_CLS_LINK_ACCESS_g, /* Parent class ID */
- &H5P_CLS_DATATYPE_ACCESS_g, /* Pointer to class ID */
- &H5P_LST_DATATYPE_ACCESS_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_LINK_ACCESS_g, /* Parent class */
+ &H5P_CLS_DATATYPE_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_DATATYPE_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_DATATYPE_ACCESS_ID_g, /* Pointer to default property list ID */
NULL, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -425,37 +454,27 @@ H5P_init_interface(void)
/* Check if the current class hasn't been initialized and can be now */
HDassert(lib_class->class_id);
- if(*lib_class->class_id == (-1) && (lib_class->par_class_id == NULL
- || *lib_class->par_class_id > 0)) {
- H5P_genclass_t *par_pclass = NULL; /* Parent class of new class */
- H5P_genclass_t *new_pclass; /* New property list class created */
-
+ if(*lib_class->class_id == (-1) && (lib_class->par_pclass == NULL
+ || *lib_class->par_pclass != NULL)) {
/* Sanity check - only the root class is not allowed to have a parent class */
- HDassert(lib_class->par_class_id || lib_class == H5P_CLS_ROOT);
-
- /* Check for parent class */
- if(lib_class->par_class_id) {
- /* Get the pointer to the parent class */
- if(NULL == (par_pclass = (H5P_genclass_t *)H5I_object(*lib_class->par_class_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
- } /* end if */
+ HDassert(lib_class->par_pclass || lib_class == H5P_CLS_ROOT);
/* Allocate the new class */
- if(NULL == (new_pclass = H5P_create_class(par_pclass, lib_class->name, lib_class->type, lib_class->create_func, lib_class->create_data, lib_class->copy_func, lib_class->copy_data, lib_class->close_func, lib_class->close_data)))
+ if(NULL == (*lib_class->pclass = H5P_create_class(lib_class->par_pclass ? *lib_class->par_pclass : NULL, lib_class->name, lib_class->type, lib_class->create_func, lib_class->create_data, lib_class->copy_func, lib_class->copy_data, lib_class->close_func, lib_class->close_data)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "class initialization failed")
/* Call routine to register properties for class */
- if(lib_class->reg_prop_func && (*lib_class->reg_prop_func)(new_pclass) < 0)
+ if(lib_class->reg_prop_func && (*lib_class->reg_prop_func)(*lib_class->pclass) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register properties")
/* Register the new class */
- if((*lib_class->class_id = H5I_register(H5I_GENPROP_CLS, new_pclass, FALSE)) < 0)
+ if((*lib_class->class_id = H5I_register(H5I_GENPROP_CLS, *lib_class->pclass, FALSE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register property list class")
/* Only register the default property list if it hasn't been created yet */
if(lib_class->def_plist_id && *lib_class->def_plist_id == (-1)) {
/* Register the default property list for the new class*/
- if((*lib_class->def_plist_id = H5P_create_id(new_pclass, FALSE)) < 0)
+ if((*lib_class->def_plist_id = H5P_create_id(*lib_class->pclass, FALSE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register default property list for class")
} /* end if */
@@ -516,20 +535,20 @@ H5P_term_interface(void)
/* Reset the default property lists, if they've been closed */
if(H5I_nmembers(H5I_GENPROP_LST)==0) {
- H5P_LST_FILE_CREATE_g =
- H5P_LST_FILE_ACCESS_g =
- H5P_LST_DATASET_CREATE_g =
- H5P_LST_DATASET_ACCESS_g =
- H5P_LST_DATASET_XFER_g =
- H5P_LST_GROUP_CREATE_g =
- H5P_LST_GROUP_ACCESS_g =
- H5P_LST_DATATYPE_CREATE_g =
- H5P_LST_DATATYPE_ACCESS_g =
- H5P_LST_ATTRIBUTE_CREATE_g =
- H5P_LST_OBJECT_COPY_g =
- H5P_LST_LINK_CREATE_g =
- H5P_LST_LINK_ACCESS_g =
- H5P_LST_FILE_MOUNT_g = (-1);
+ 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_GROUP_CREATE_ID_g =
+ H5P_LST_GROUP_ACCESS_ID_g =
+ H5P_LST_DATATYPE_CREATE_ID_g =
+ H5P_LST_DATATYPE_ACCESS_ID_g =
+ H5P_LST_ATTRIBUTE_CREATE_ID_g =
+ H5P_LST_OBJECT_COPY_ID_g =
+ H5P_LST_LINK_CREATE_ID_g =
+ H5P_LST_LINK_ACCESS_ID_g =
+ H5P_LST_FILE_MOUNT_ID_g = (-1);
} /* end if */
} /* end if */
@@ -555,7 +574,25 @@ H5P_term_interface(void)
H5P_CLS_OBJECT_COPY_g =
H5P_CLS_LINK_CREATE_g =
H5P_CLS_LINK_ACCESS_g =
- H5P_CLS_FILE_MOUNT_g = (-1);
+ H5P_CLS_FILE_MOUNT_g = NULL;
+
+ H5P_CLS_ROOT_ID_g =
+ H5P_CLS_OBJECT_CREATE_ID_g =
+ H5P_CLS_FILE_CREATE_ID_g =
+ H5P_CLS_FILE_ACCESS_ID_g =
+ H5P_CLS_DATASET_CREATE_ID_g =
+ H5P_CLS_DATASET_ACCESS_ID_g =
+ H5P_CLS_DATASET_XFER_ID_g =
+ H5P_CLS_GROUP_CREATE_ID_g =
+ H5P_CLS_GROUP_ACCESS_ID_g =
+ H5P_CLS_DATATYPE_CREATE_ID_g =
+ H5P_CLS_DATATYPE_ACCESS_ID_g =
+ H5P_CLS_STRING_CREATE_ID_g =
+ H5P_CLS_ATTRIBUTE_CREATE_ID_g =
+ H5P_CLS_OBJECT_COPY_ID_g =
+ H5P_CLS_LINK_CREATE_ID_g =
+ H5P_CLS_LINK_ACCESS_ID_g =
+ H5P_CLS_FILE_MOUNT_ID_g = (-1);
} /* end if */
} /* end if */
} else {
@@ -2888,41 +2925,6 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_get_class
- PURPOSE
- Internal routine to query the class of a generic property list
- USAGE
- H5P_genclass_t *H5P_get_class(plist)
- H5P_genplist_t *plist; IN: Property list to check
- RETURNS
- Success: Pointer to the class for a property list
- Failure: NULL
- DESCRIPTION
- This routine retrieves a pointer to the class for a property list.
-
- GLOBAL VARIABLES
- COMMENTS, BUGS, ASSUMPTIONS
- EXAMPLES
- REVISION LOG
---------------------------------------------------------------------------*/
-H5P_genclass_t *
-H5P_get_class(const H5P_genplist_t *plist)
-{
- H5P_genclass_t *ret_value; /* return value */
-
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- HDassert(plist);
-
- /* Get property size */
- ret_value = plist->pclass;
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_get_class() */
-
-
-/*--------------------------------------------------------------------------
- NAME
H5P_get_nprops_plist
PURPOSE
Internal routine to query the number of properties in a property list
@@ -3353,12 +3355,12 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_isa_class_real
+ H5P_class_isa
PURPOSE
Internal routine to query whether a property class is the same as another
class.
USAGE
- htri_t H5P_isa_class_real(pclass1, pclass2)
+ htri_t H5P_class_isa(pclass1, pclass2)
H5P_genclass_t *pclass1; IN: Property class to check
H5P_genclass_t *pclass2; IN: Property class to compare with
RETURNS
@@ -3374,12 +3376,12 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static htri_t
-H5P_isa_class_real(H5P_genclass_t *pclass1, H5P_genclass_t *pclass2)
+htri_t
+H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
{
htri_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(pclass1);
HDassert(pclass2);
@@ -3390,14 +3392,14 @@ H5P_isa_class_real(H5P_genclass_t *pclass1, H5P_genclass_t *pclass2)
} else {
/* Check if the class is derived, and walk up the chain, if so */
if(pclass1->parent != NULL)
- ret_value = H5P_isa_class_real(pclass1->parent, pclass2);
+ ret_value = H5P_class_isa(pclass1->parent, pclass2);
else
HGOTO_DONE(FALSE);
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_isa_class_real() */
+} /* H5P_class_isa() */
/*--------------------------------------------------------------------------
@@ -3441,7 +3443,7 @@ H5P_isa_class(hid_t plist_id, hid_t pclass_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class")
/* Compare the property list's class against the other class */
- if((ret_value = H5P_isa_class_real(plist->pclass, pclass)) < 0)
+ if((ret_value = H5P_class_isa(plist->pclass, pclass)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to compare property list classes")
done:
@@ -5021,67 +5023,67 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
/* Instantiate a property list of the proper type */
switch(type) {
case H5P_TYPE_OBJECT_CREATE:
- class_id = H5P_CLS_OBJECT_CREATE_g;
+ class_id = H5P_CLS_OBJECT_CREATE_ID_g;
break;
case H5P_TYPE_FILE_CREATE:
- class_id = H5P_CLS_FILE_CREATE_g;
+ class_id = H5P_CLS_FILE_CREATE_ID_g;
break;
case H5P_TYPE_FILE_ACCESS:
- class_id = H5P_CLS_FILE_ACCESS_g;
+ class_id = H5P_CLS_FILE_ACCESS_ID_g;
break;
case H5P_TYPE_DATASET_CREATE:
- class_id = H5P_CLS_DATASET_CREATE_g;
+ class_id = H5P_CLS_DATASET_CREATE_ID_g;
break;
case H5P_TYPE_DATASET_ACCESS:
- class_id = H5P_CLS_DATASET_ACCESS_g;
+ class_id = H5P_CLS_DATASET_ACCESS_ID_g;
break;
case H5P_TYPE_DATASET_XFER:
- class_id = H5P_CLS_DATASET_XFER_g;
+ class_id = H5P_CLS_DATASET_XFER_ID_g;
break;
case H5P_TYPE_FILE_MOUNT:
- class_id = H5P_CLS_FILE_MOUNT_g;
+ class_id = H5P_CLS_FILE_MOUNT_ID_g;
break;
case H5P_TYPE_GROUP_CREATE:
- class_id = H5P_CLS_GROUP_CREATE_g;
+ class_id = H5P_CLS_GROUP_CREATE_ID_g;
break;
case H5P_TYPE_GROUP_ACCESS:
- class_id = H5P_CLS_GROUP_ACCESS_g;
+ class_id = H5P_CLS_GROUP_ACCESS_ID_g;
break;
case H5P_TYPE_DATATYPE_CREATE:
- class_id = H5P_CLS_DATATYPE_CREATE_g;
+ class_id = H5P_CLS_DATATYPE_CREATE_ID_g;
break;
case H5P_TYPE_DATATYPE_ACCESS:
- class_id = H5P_CLS_DATATYPE_ACCESS_g;
+ class_id = H5P_CLS_DATATYPE_ACCESS_ID_g;
break;
case H5P_TYPE_STRING_CREATE:
- class_id = H5P_CLS_STRING_CREATE_g;
+ class_id = H5P_CLS_STRING_CREATE_ID_g;
break;
case H5P_TYPE_ATTRIBUTE_CREATE:
- class_id = H5P_CLS_ATTRIBUTE_CREATE_g;
+ class_id = H5P_CLS_ATTRIBUTE_CREATE_ID_g;
break;
case H5P_TYPE_OBJECT_COPY:
- class_id = H5P_CLS_OBJECT_COPY_g;
+ class_id = H5P_CLS_OBJECT_COPY_ID_g;
break;
case H5P_TYPE_LINK_CREATE:
- class_id = H5P_CLS_LINK_CREATE_g;
+ class_id = H5P_CLS_LINK_CREATE_ID_g;
break;
case H5P_TYPE_LINK_ACCESS:
- class_id = H5P_CLS_LINK_ACCESS_g;
+ class_id = H5P_CLS_LINK_ACCESS_ID_g;
break;
case H5P_TYPE_USER: /* shut compiler warnings up */
@@ -5103,3 +5105,59 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P__new_plist_of_type() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5P_get_plist_id
+ *
+ * Purpose: Quick and dirty routine to retrieve property list ID from
+ * property list structure.
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5P_genplist_t data structure)
+ *
+ * Return: Success: Non-negative ID of property list.
+ * Failure: negative.
+ *
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * April 22, 2014
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5P_get_plist_id(const H5P_genplist_t *plist)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(plist);
+
+ FUNC_LEAVE_NOAPI(plist->plist_id)
+} /* end H5P_get_plist_id() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5P_get_class
+ *
+ * Purpose: Quick and dirty routine to retrieve property list class from
+ * property list structure.
+ * (Mainly added to stop non-file routines from poking about in the
+ * H5P_genplist_t data structure)
+ *
+ * Return: Success: Non-NULL class of property list.
+ * Failure: NULL
+ *
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * April 22, 2014
+ *
+ *-------------------------------------------------------------------------
+ */
+H5P_genclass_t *
+H5P_get_class(const H5P_genplist_t *plist)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(plist);
+
+ FUNC_LEAVE_NOAPI(plist->pclass)
+} /* end H5P_get_class() */
+
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index 676b574..0d39b6c 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -123,10 +123,13 @@ static herr_t H5P_lacc_elink_fapl_close(const char* name, size_t size, void* val
const H5P_libclass_t H5P_CLS_LACC[1] = {{
"link access", /* Class name for debugging */
H5P_TYPE_LINK_ACCESS, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_LINK_ACCESS_g, /* Pointer to class ID */
- &H5P_LST_LINK_ACCESS_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_LINK_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_LINK_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_LINK_ACCESS_ID_g, /* Pointer to default property list ID */
H5P_lacc_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c
index d81d55c..cde2035 100644
--- a/src/H5Plcpl.c
+++ b/src/H5Plcpl.c
@@ -77,10 +77,13 @@ static herr_t H5P_lcrt_reg_prop(H5P_genclass_t *pclass);
const H5P_libclass_t H5P_CLS_LCRT[1] = {{
"link create", /* Class name for debugging */
H5P_TYPE_LINK_CREATE, /* Class type */
- &H5P_CLS_STRING_CREATE_g, /* Parent class ID */
- &H5P_CLS_LINK_CREATE_g, /* Pointer to class ID */
- &H5P_LST_LINK_CREATE_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_STRING_CREATE_g, /* Parent class */
+ &H5P_CLS_LINK_CREATE_g, /* Pointer to class */
+ &H5P_CLS_LINK_CREATE_ID_g, /* Pointer to class ID */
+ &H5P_LST_LINK_CREATE_ID_g, /* Pointer to default property list ID */
H5P_lcrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index df4ebb6..37beb90 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -104,10 +104,13 @@ static herr_t H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter,
const H5P_libclass_t H5P_CLS_OCRT[1] = {{
"object create", /* Class name for debugging */
H5P_TYPE_OBJECT_CREATE, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_OBJECT_CREATE_g, /* Pointer to class ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_OBJECT_CREATE_g, /* Pointer to class */
+ &H5P_CLS_OBJECT_CREATE_ID_g, /* Pointer to class ID */
NULL, /* Pointer to default property list ID */
H5P__ocrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
H5P__ocrt_copy, /* Class copy callback */
diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c
index e5e5f51..fd4d968 100644
--- a/src/H5Pocpypl.c
+++ b/src/H5Pocpypl.c
@@ -38,6 +38,7 @@
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
+#include "H5Oprivate.h" /* Object headers */
#include "H5Ppkg.h" /* Property lists */
@@ -100,10 +101,13 @@ static herr_t H5P__ocpy_merge_comm_dt_list_close(const char* name, size_t size,
const H5P_libclass_t H5P_CLS_OCPY[1] = {{
"object copy", /* Class name for debugging */
H5P_TYPE_OBJECT_COPY, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_OBJECT_COPY_g, /* Pointer to class ID */
- &H5P_LST_OBJECT_COPY_g, /* Pointer to default property list ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_OBJECT_COPY_g, /* Pointer to class */
+ &H5P_CLS_OBJECT_COPY_ID_g, /* Pointer to class ID */
+ &H5P_LST_OBJECT_COPY_ID_g, /* Pointer to default property list ID */
H5P__ocpy_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h
index f80edb8..2942a4d 100644
--- a/src/H5Ppkg.h
+++ b/src/H5Ppkg.h
@@ -127,7 +127,8 @@ typedef struct H5P_libclass_t {
const char *name; /* Class name */
H5P_plist_type_t type; /* Class type */
- hid_t const * const par_class_id; /* Pointer to global parent class property list class ID */
+ H5P_genclass_t * * par_pclass; /* Pointer to global parent class property list class */
+ H5P_genclass_t * * pclass; /* Pointer to global property list class */
hid_t * const class_id; /* Pointer to global property list class ID */
hid_t * const def_plist_id; /* Pointer to global default property list ID */
H5P_reg_prop_func_t reg_prop_func; /* Register class's properties */
@@ -144,6 +145,9 @@ typedef struct H5P_libclass_t {
/* Property list/class iterator callback function pointer */
typedef int (*H5P_iterate_int_t)(H5P_genprop_t *prop, void *udata);
+/* Forward declarations (for prototypes & struct definitions) */
+struct H5Z_filter_info_t;
+
/*****************************/
/* Package Private Variables */
/*****************************/
@@ -183,7 +187,6 @@ H5_DLL herr_t H5P_get_size_plist(const H5P_genplist_t *plist, const char *name,
size_t *size);
H5_DLL herr_t H5P_get_size_pclass(H5P_genclass_t *pclass, const char *name,
size_t *size);
-H5_DLL H5P_genclass_t *H5P_get_class(const H5P_genplist_t *plist);
H5_DLL herr_t H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops);
H5_DLL int H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2);
H5_DLL herr_t H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2,
@@ -199,9 +202,6 @@ H5_DLL char *H5P_get_class_path(H5P_genclass_t *pclass);
H5_DLL H5P_genclass_t *H5P_open_class_path(const char *path);
H5_DLL H5P_genclass_t *H5P_get_class_parent(const H5P_genclass_t *pclass);
H5_DLL herr_t H5P_close_class(void *_pclass);
-H5_DLL herr_t H5P_get_filter(const H5Z_filter_info_t *filter,
- unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[],
- size_t namelen, char name[], unsigned *filter_config);
H5_DLL H5P_genprop_t *H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name);
H5_DLL hid_t H5P__new_plist_of_type(H5P_plist_type_t type);
@@ -222,6 +222,11 @@ H5_DLL herr_t H5P__decode_uint8_t(const void **_pp, void *value);
H5_DLL herr_t H5P__decode_hbool_t(const void **_pp, void *value);
H5_DLL herr_t H5P__decode_double(const void **_pp, void *value);
+/* Private OCPL routines */
+H5_DLL herr_t H5P_get_filter(const struct H5Z_filter_info_t *filter,
+ unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[],
+ size_t namelen, char name[], unsigned *filter_config);
+
/* Testing functions */
#ifdef H5P_TESTING
H5_DLL char *H5P_get_class_path_test(hid_t pclass_id);
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h
index 083619b..3fd94a9 100644
--- a/src/H5Pprivate.h
+++ b/src/H5Pprivate.h
@@ -24,7 +24,6 @@
/* Private headers needed by this file */
#include "H5private.h" /* Generic Functions */
-#include "H5Oprivate.h" /* Object headers */
/**************************/
/* Library Private Macros */
@@ -33,6 +32,15 @@
/* ======== String creation property names ======== */
#define H5P_STRCRT_CHAR_ENCODING_NAME "character_encoding" /* Character set encoding for string */
+/* If the module using this macro is allowed access to the private variables, access them directly */
+#ifdef H5P_PACKAGE
+#define H5P_PLIST_ID(P) ((P)->plist_id)
+#define H5P_CLASS(P) ((P)->pclass)
+#else /* H5F_PACKAGE */
+#define H5P_PLIST_ID(P) (H5P_get_plist_id(P))
+#define H5P_CLASS(P) (H5P_get_class(P))
+#endif /* H5P_PACKAGE */
+
/****************************/
/* Library Private Typedefs */
@@ -64,10 +72,33 @@ typedef enum H5P_plist_type_t {
H5P_TYPE_MAX_TYPE
} H5P_plist_type_t;
+/* Forward declarations (for prototypes & struct definitions) */
+struct H5O_fill_t;
+struct H5T_t;
+
/*****************************/
/* Library Private Variables */
/*****************************/
+/* Predefined property list classes. */
+H5_DLLVAR H5P_genclass_t *H5P_CLS_ROOT_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_OBJECT_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_FILE_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_FILE_ACCESS_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_DATASET_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_DATASET_ACCESS_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_DATASET_XFER_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_FILE_MOUNT_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_GROUP_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_GROUP_ACCESS_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_DATATYPE_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_DATATYPE_ACCESS_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_ATTRIBUTE_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_OBJECT_COPY_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_LINK_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_LINK_ACCESS_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_STRING_CREATE_g;
+
/******************************/
/* Library Private Prototypes */
@@ -89,6 +120,7 @@ H5_DLL herr_t H5P_insert(H5P_genplist_t *plist, const char *name, size_t size,
H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close);
H5_DLL herr_t H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name);
H5_DLL htri_t H5P_exist_plist(const H5P_genplist_t *plist, const char *name);
+H5_DLL htri_t H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2);
H5_DLL char *H5P_get_class_name(H5P_genclass_t *pclass);
H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops,
hbool_t recurse);
@@ -99,7 +131,7 @@ H5_DLL herr_t H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id,
H5_DLL herr_t H5P_set_vlen_mem_manager(H5P_genplist_t *plist,
H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func,
void *free_info);
-H5_DLL herr_t H5P_is_fill_value_defined(const H5O_fill_t *fill,
+H5_DLL herr_t H5P_is_fill_value_defined(const struct H5O_fill_t *fill,
H5D_fill_value_t *status);
H5_DLL int H5P_fill_value_cmp(const void *value1, const void *value2,
size_t size);
@@ -110,6 +142,10 @@ H5_DLL herr_t H5P_get_filter_by_id(H5P_genplist_t *plist, H5Z_filter_t id,
size_t namelen, char name[], unsigned *filter_config);
H5_DLL htri_t H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id);
+/* Query internal fields of the property list struct */
+H5_DLL hid_t H5P_get_plist_id(const H5P_genplist_t *plist);
+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);
@@ -123,7 +159,7 @@ H5_DLL size_t H5P_peek_size_t(H5P_genplist_t *plist, const char *name);
/* Private DCPL routines */
H5_DLL herr_t H5P_fill_value_defined(H5P_genplist_t *plist,
H5D_fill_value_t *status);
-H5_DLL herr_t H5P_get_fill_value(H5P_genplist_t *plist, H5T_t *type,
+H5_DLL herr_t H5P_get_fill_value(H5P_genplist_t *plist, const struct H5T_t *type,
void *value, hid_t dxpl_id);
#endif /* _H5Pprivate_H */
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index fd5ff5f..a3f13c5 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -52,41 +52,41 @@
* The library's property list classes
*/
-#define H5P_ROOT (H5OPEN H5P_CLS_ROOT_g)
-#define H5P_OBJECT_CREATE (H5OPEN H5P_CLS_OBJECT_CREATE_g)
-#define H5P_FILE_CREATE (H5OPEN H5P_CLS_FILE_CREATE_g)
-#define H5P_FILE_ACCESS (H5OPEN H5P_CLS_FILE_ACCESS_g)
-#define H5P_DATASET_CREATE (H5OPEN H5P_CLS_DATASET_CREATE_g)
-#define H5P_DATASET_ACCESS (H5OPEN H5P_CLS_DATASET_ACCESS_g)
-#define H5P_DATASET_XFER (H5OPEN H5P_CLS_DATASET_XFER_g)
-#define H5P_FILE_MOUNT (H5OPEN H5P_CLS_FILE_MOUNT_g)
-#define H5P_GROUP_CREATE (H5OPEN H5P_CLS_GROUP_CREATE_g)
-#define H5P_GROUP_ACCESS (H5OPEN H5P_CLS_GROUP_ACCESS_g)
-#define H5P_DATATYPE_CREATE (H5OPEN H5P_CLS_DATATYPE_CREATE_g)
-#define H5P_DATATYPE_ACCESS (H5OPEN H5P_CLS_DATATYPE_ACCESS_g)
-#define H5P_STRING_CREATE (H5OPEN H5P_CLS_STRING_CREATE_g)
-#define H5P_ATTRIBUTE_CREATE (H5OPEN H5P_CLS_ATTRIBUTE_CREATE_g)
-#define H5P_OBJECT_COPY (H5OPEN H5P_CLS_OBJECT_COPY_g)
-#define H5P_LINK_CREATE (H5OPEN H5P_CLS_LINK_CREATE_g)
-#define H5P_LINK_ACCESS (H5OPEN H5P_CLS_LINK_ACCESS_g)
+#define H5P_ROOT (H5OPEN H5P_CLS_ROOT_ID_g)
+#define H5P_OBJECT_CREATE (H5OPEN H5P_CLS_OBJECT_CREATE_ID_g)
+#define H5P_FILE_CREATE (H5OPEN H5P_CLS_FILE_CREATE_ID_g)
+#define H5P_FILE_ACCESS (H5OPEN H5P_CLS_FILE_ACCESS_ID_g)
+#define H5P_DATASET_CREATE (H5OPEN H5P_CLS_DATASET_CREATE_ID_g)
+#define H5P_DATASET_ACCESS (H5OPEN H5P_CLS_DATASET_ACCESS_ID_g)
+#define H5P_DATASET_XFER (H5OPEN H5P_CLS_DATASET_XFER_ID_g)
+#define H5P_FILE_MOUNT (H5OPEN H5P_CLS_FILE_MOUNT_ID_g)
+#define H5P_GROUP_CREATE (H5OPEN H5P_CLS_GROUP_CREATE_ID_g)
+#define H5P_GROUP_ACCESS (H5OPEN H5P_CLS_GROUP_ACCESS_ID_g)
+#define H5P_DATATYPE_CREATE (H5OPEN H5P_CLS_DATATYPE_CREATE_ID_g)
+#define H5P_DATATYPE_ACCESS (H5OPEN H5P_CLS_DATATYPE_ACCESS_ID_g)
+#define H5P_STRING_CREATE (H5OPEN H5P_CLS_STRING_CREATE_ID_g)
+#define H5P_ATTRIBUTE_CREATE (H5OPEN H5P_CLS_ATTRIBUTE_CREATE_ID_g)
+#define H5P_OBJECT_COPY (H5OPEN H5P_CLS_OBJECT_COPY_ID_g)
+#define H5P_LINK_CREATE (H5OPEN H5P_CLS_LINK_CREATE_ID_g)
+#define H5P_LINK_ACCESS (H5OPEN H5P_CLS_LINK_ACCESS_ID_g)
/*
* The library's default property lists
*/
-#define H5P_FILE_CREATE_DEFAULT (H5OPEN H5P_LST_FILE_CREATE_g)
-#define H5P_FILE_ACCESS_DEFAULT (H5OPEN H5P_LST_FILE_ACCESS_g)
-#define H5P_DATASET_CREATE_DEFAULT (H5OPEN H5P_LST_DATASET_CREATE_g)
-#define H5P_DATASET_ACCESS_DEFAULT (H5OPEN H5P_LST_DATASET_ACCESS_g)
-#define H5P_DATASET_XFER_DEFAULT (H5OPEN H5P_LST_DATASET_XFER_g)
-#define H5P_FILE_MOUNT_DEFAULT (H5OPEN H5P_LST_FILE_MOUNT_g)
-#define H5P_GROUP_CREATE_DEFAULT (H5OPEN H5P_LST_GROUP_CREATE_g)
-#define H5P_GROUP_ACCESS_DEFAULT (H5OPEN H5P_LST_GROUP_ACCESS_g)
-#define H5P_DATATYPE_CREATE_DEFAULT (H5OPEN H5P_LST_DATATYPE_CREATE_g)
-#define H5P_DATATYPE_ACCESS_DEFAULT (H5OPEN H5P_LST_DATATYPE_ACCESS_g)
-#define H5P_ATTRIBUTE_CREATE_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_CREATE_g)
-#define H5P_OBJECT_COPY_DEFAULT (H5OPEN H5P_LST_OBJECT_COPY_g)
-#define H5P_LINK_CREATE_DEFAULT (H5OPEN H5P_LST_LINK_CREATE_g)
-#define H5P_LINK_ACCESS_DEFAULT (H5OPEN H5P_LST_LINK_ACCESS_g)
+#define H5P_FILE_CREATE_DEFAULT (H5OPEN H5P_LST_FILE_CREATE_ID_g)
+#define H5P_FILE_ACCESS_DEFAULT (H5OPEN H5P_LST_FILE_ACCESS_ID_g)
+#define H5P_DATASET_CREATE_DEFAULT (H5OPEN H5P_LST_DATASET_CREATE_ID_g)
+#define H5P_DATASET_ACCESS_DEFAULT (H5OPEN H5P_LST_DATASET_ACCESS_ID_g)
+#define H5P_DATASET_XFER_DEFAULT (H5OPEN H5P_LST_DATASET_XFER_ID_g)
+#define H5P_FILE_MOUNT_DEFAULT (H5OPEN H5P_LST_FILE_MOUNT_ID_g)
+#define H5P_GROUP_CREATE_DEFAULT (H5OPEN H5P_LST_GROUP_CREATE_ID_g)
+#define H5P_GROUP_ACCESS_DEFAULT (H5OPEN H5P_LST_GROUP_ACCESS_ID_g)
+#define H5P_DATATYPE_CREATE_DEFAULT (H5OPEN H5P_LST_DATATYPE_CREATE_ID_g)
+#define H5P_DATATYPE_ACCESS_DEFAULT (H5OPEN H5P_LST_DATATYPE_ACCESS_ID_g)
+#define H5P_ATTRIBUTE_CREATE_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_CREATE_ID_g)
+#define H5P_OBJECT_COPY_DEFAULT (H5OPEN H5P_LST_OBJECT_COPY_ID_g)
+#define H5P_LINK_CREATE_DEFAULT (H5OPEN H5P_LST_LINK_CREATE_ID_g)
+#define H5P_LINK_ACCESS_DEFAULT (H5OPEN H5P_LST_LINK_ACCESS_ID_g)
/* Common creation order flags (for links in groups and attributes on objects) */
#define H5P_CRT_ORDER_TRACKED 0x0001
@@ -172,40 +172,40 @@ typedef enum H5D_mpio_no_collective_cause_t {
/* Property list class IDs */
/* (Internal to library, do not use! Use macros above) */
-H5_DLLVAR hid_t H5P_CLS_ROOT_g;
-H5_DLLVAR hid_t H5P_CLS_OBJECT_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_FILE_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_FILE_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_DATASET_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_DATASET_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_DATASET_XFER_g;
-H5_DLLVAR hid_t H5P_CLS_FILE_MOUNT_g;
-H5_DLLVAR hid_t H5P_CLS_GROUP_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_GROUP_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_DATATYPE_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_DATATYPE_ACCESS_g;
-H5_DLLVAR hid_t H5P_CLS_STRING_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_OBJECT_COPY_g;
-H5_DLLVAR hid_t H5P_CLS_LINK_CREATE_g;
-H5_DLLVAR hid_t H5P_CLS_LINK_ACCESS_g;
+H5_DLLVAR hid_t H5P_CLS_ROOT_ID_g;
+H5_DLLVAR hid_t H5P_CLS_OBJECT_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_FILE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_FILE_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_CLS_DATASET_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_DATASET_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_CLS_DATASET_XFER_ID_g;
+H5_DLLVAR hid_t H5P_CLS_FILE_MOUNT_ID_g;
+H5_DLLVAR hid_t H5P_CLS_GROUP_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_GROUP_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_CLS_DATATYPE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_DATATYPE_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_CLS_STRING_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_OBJECT_COPY_ID_g;
+H5_DLLVAR hid_t H5P_CLS_LINK_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_LINK_ACCESS_ID_g;
/* Default roperty list IDs */
/* (Internal to library, do not use! Use macros above) */
-H5_DLLVAR hid_t H5P_LST_FILE_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_FILE_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_DATASET_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_DATASET_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_DATASET_XFER_g;
-H5_DLLVAR hid_t H5P_LST_FILE_MOUNT_g;
-H5_DLLVAR hid_t H5P_LST_GROUP_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_GROUP_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_DATATYPE_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_DATATYPE_ACCESS_g;
-H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_OBJECT_COPY_g;
-H5_DLLVAR hid_t H5P_LST_LINK_CREATE_g;
-H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_g;
+H5_DLLVAR hid_t H5P_LST_FILE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_FILE_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_LST_DATASET_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_DATASET_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_LST_DATASET_XFER_ID_g;
+H5_DLLVAR hid_t H5P_LST_FILE_MOUNT_ID_g;
+H5_DLLVAR hid_t H5P_LST_GROUP_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_GROUP_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_LST_DATATYPE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_DATATYPE_ACCESS_ID_g;
+H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_OBJECT_COPY_ID_g;
+H5_DLLVAR hid_t H5P_LST_LINK_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_ID_g;
/*********************/
/* Public Prototypes */
diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c
index bedacb0..3ba625e 100644
--- a/src/H5Pstrcpl.c
+++ b/src/H5Pstrcpl.c
@@ -34,6 +34,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* Files */
#include "H5Iprivate.h" /* IDs */
#include "H5Ppkg.h" /* Property lists */
@@ -80,10 +81,13 @@ static herr_t H5P__strcrt_char_encoding_dec(const void **_pp, void *value);
const H5P_libclass_t H5P_CLS_STRCRT[1] = {{
"string create", /* Class name for debugging */
H5P_TYPE_STRING_CREATE, /* Class type */
- &H5P_CLS_ROOT_g, /* Parent class ID */
- &H5P_CLS_STRING_CREATE_g, /* Pointer to class ID */
+
+ &H5P_CLS_ROOT_g, /* Parent class */
+ &H5P_CLS_STRING_CREATE_g, /* Pointer to class */
+ &H5P_CLS_STRING_CREATE_ID_g, /* Pointer to class ID */
NULL, /* Pointer to default property list ID */
H5P__strcrt_reg_prop, /* Default property registration routine */
+
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
diff --git a/src/H5T.c b/src/H5T.c
index cd3c48a..8b23736 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -770,7 +770,6 @@ H5T_init_interface(void)
hsize_t dim[1]={1}; /* Dimension info for array datatype */
herr_t status;
unsigned copied_dtype=1; /* Flag to indicate whether datatype was copied or allocated (for error cleanup) */
- H5P_genclass_t *crt_pclass; /* Property list class for datatype creation properties */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1347,21 +1346,17 @@ H5T_init_interface(void)
if (status<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to register conversion function(s)")
- /* ========== Datatype Creation Property Class Initialization ============*/
- HDassert(H5P_CLS_DATATYPE_CREATE_g!=-1);
-
- /* Get the pointer to group creation class */
- if(NULL == (crt_pclass = (H5P_genclass_t *)H5I_object(H5P_CLS_DATATYPE_CREATE_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
-
/* Register datatype creation property class properties here. See similar
* code in H5D_init_interface(), etc. for example.
*/
/* Only register the default property list if it hasn't been created yet */
- if(H5P_LST_DATATYPE_CREATE_g == (-1)) {
+ if(H5P_LST_DATATYPE_CREATE_ID_g == (-1)) {
+ /* ========== Datatype Creation Property Class Initialization ============*/
+ HDassert(H5P_CLS_DATATYPE_CREATE_g != NULL);
+
/* Register the default datatype creation property list */
- if((H5P_LST_DATATYPE_CREATE_g = H5P_create_id(crt_pclass, FALSE)) < 0)
+ if((H5P_LST_DATATYPE_CREATE_ID_g = H5P_create_id(H5P_CLS_DATATYPE_CREATE_g, FALSE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class")
} /* end if */
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index bfae624..7359a56 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -651,7 +651,7 @@ H5Tget_create_plist(hid_t dtype_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Copy the default datatype creation property list */
- if(NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_g)))
+ if(NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get default creation property list")
if((new_tcpl_id = H5P_copy_plist(tcpl_plist, TRUE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to copy the creation property list")
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index bd5bef0..73d85ac 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -51,7 +51,7 @@
/****************************/
/* Structure to store information about each filter's parameters */
-typedef struct {
+typedef struct H5Z_filter_info_t {
H5Z_filter_t id; /*filter identification number */
unsigned flags; /*defn and invocation flags */
char _name[H5Z_COMMON_NAME_LEN]; /*internal filter name */