summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-07-10 15:47:47 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-07-10 15:47:47 (GMT)
commitdee5636a90a214926d4b9fb24e671921a3e3c4bc (patch)
tree4effad84050ec2463b2325a7902bcac45b53c44c /src
parent041e56526287225fe5675a5a2096692749cdf66d (diff)
downloadhdf5-dee5636a90a214926d4b9fb24e671921a3e3c4bc.zip
hdf5-dee5636a90a214926d4b9fb24e671921a3e3c4bc.tar.gz
hdf5-dee5636a90a214926d4b9fb24e671921a3e3c4bc.tar.bz2
[svn-r22542] update H5I_register_type usage to take a free_aux function callback
Diffstat (limited to 'src')
-rw-r--r--src/H5A.c2
-rw-r--r--src/H5D.c2
-rw-r--r--src/H5Dint.c2
-rw-r--r--src/H5E.c6
-rw-r--r--src/H5F.c2
-rw-r--r--src/H5FD.c3
-rw-r--r--src/H5G.c2
-rw-r--r--src/H5I.c343
-rw-r--r--src/H5Iprivate.h4
-rw-r--r--src/H5Pint.c6
-rw-r--r--src/H5R.c3
-rw-r--r--src/H5S.c3
-rw-r--r--src/H5T.c2
-rw-r--r--src/H5VL.c3
14 files changed, 138 insertions, 245 deletions
diff --git a/src/H5A.c b/src/H5A.c
index b6b5f90..6915e29 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -140,7 +140,7 @@ H5A_init_interface(void)
/*
* Create attribute ID type.
*/
- if(H5I_register_type2(H5I_ATTR, (size_t)H5I_ATTRID_HASHSIZE, H5A_RESERVED_ATOMS,
+ if(H5I_register_type(H5I_ATTR, (size_t)H5I_ATTRID_HASHSIZE, H5A_RESERVED_ATOMS,
NULL, (H5I_free2_t)H5A_close_attr) < H5I_FILE)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "unable to initialize interface")
diff --git a/src/H5D.c b/src/H5D.c
index 270befc..3b87e3a 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -94,7 +94,7 @@ H5D__init_pub_interface(void)
FUNC_ENTER_STATIC
/* Initialize the atom group for the dataset IDs */
- if(H5I_register_type2(H5I_DATASET, (size_t)H5I_DATASETID_HASHSIZE, H5D_RESERVED_ATOMS,
+ if(H5I_register_type(H5I_DATASET, (size_t)H5I_DATASETID_HASHSIZE, H5D_RESERVED_ATOMS,
NULL, (H5I_free2_t)H5D_close_dataset)<H5I_FILE)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize interface")
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 59a2015..27072ab 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -163,7 +163,7 @@ H5D__init_interface(void)
FUNC_ENTER_STATIC
/* Initialize the atom group for the dataset IDs */
- if(H5I_register_type2(H5I_DATASET, (size_t)H5I_DATASETID_HASHSIZE, H5D_RESERVED_ATOMS,
+ if(H5I_register_type(H5I_DATASET, (size_t)H5I_DATASETID_HASHSIZE, H5D_RESERVED_ATOMS,
NULL, (H5I_free2_t)H5D_close_dataset)<H5I_FILE)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize interface")
diff --git a/src/H5E.c b/src/H5E.c
index e74211e..155e951 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -214,17 +214,17 @@ H5E_init_interface(void)
/* Initialize the atom group for the error class IDs */
if(H5I_register_type(H5I_ERROR_CLASS, (size_t)H5I_ERRCLS_HASHSIZE, H5E_RESERVED_ATOMS,
- (H5I_free_t)H5E_unregister_class) < H5I_FILE)
+ (H5I_free_t)H5E_unregister_class, NULL) < H5I_FILE)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group")
/* Initialize the atom group for the major error IDs */
if(H5I_register_type(H5I_ERROR_MSG, (size_t)H5I_ERRMSG_HASHSIZE, H5E_RESERVED_ATOMS,
- (H5I_free_t)H5E_close_msg) < H5I_FILE)
+ (H5I_free_t)H5E_close_msg, NULL) < H5I_FILE)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group")
/* Initialize the atom group for the error stacks */
if(H5I_register_type(H5I_ERROR_STACK, (size_t)H5I_ERRSTK_HASHSIZE, H5E_RESERVED_ATOMS,
- (H5I_free_t)H5E_close_stack) < H5I_FILE)
+ (H5I_free_t)H5E_close_stack, NULL) < H5I_FILE)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group")
#ifndef H5_HAVE_THREADSAFE
diff --git a/src/H5F.c b/src/H5F.c
index 431e86f..cb25723 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -76,7 +76,7 @@ H5F__init_pub_interface(void)
/*
* Initialize the atom group for the file IDs.
*/
- if(H5I_register_type2(H5I_FILE, (size_t)H5I_FILEID_HASHSIZE, 0,
+ if(H5I_register_type(H5I_FILE, (size_t)H5I_FILEID_HASHSIZE, 0,
NULL, (H5I_free2_t)H5F_close_file)<H5I_FILE)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to initialize interface")
diff --git a/src/H5FD.c b/src/H5FD.c
index 18b0eb6..1161b23 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -153,7 +153,8 @@ H5FD_init_interface(void)
FUNC_ENTER_NOAPI_NOINIT
- if(H5I_register_type(H5I_VFL, (size_t)H5I_VFL_HASHSIZE, 0, (H5I_free_t)H5FD_free_cls)<H5I_FILE)
+ if(H5I_register_type(H5I_VFL, (size_t)H5I_VFL_HASHSIZE, 0,
+ (H5I_free_t)H5FD_free_cls, NULL)<H5I_FILE)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize interface")
/* Reset the file serial numbers */
diff --git a/src/H5G.c b/src/H5G.c
index 2ab15fa..4a6c211 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -188,7 +188,7 @@ H5G_init_interface(void)
FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the group IDs */
- if(H5I_register_type2(H5I_GROUP, (size_t)H5I_GROUPID_HASHSIZE, H5G_RESERVED_ATOMS,
+ if(H5I_register_type(H5I_GROUP, (size_t)H5I_GROUPID_HASHSIZE, H5G_RESERVED_ATOMS,
NULL, (H5I_free2_t)H5G_close_group) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface")
diff --git a/src/H5I.c b/src/H5I.c
index 97ba5fe..5418dc0 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -243,7 +243,7 @@ H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func)
H5TRACE3("It", "zIux", hash_size, reserved, free_func);
/* Call H5I_register_type with a value of 0 to get a new type */
- ret_value = H5I_register_type((H5I_type_t)0, hash_size, reserved, free_func);
+ ret_value = H5I_register_type((H5I_type_t)0, hash_size, reserved, free_func, NULL);
done:
FUNC_LEAVE_API(ret_value)
@@ -276,7 +276,7 @@ done:
*/
H5I_type_t
H5I_register_type(H5I_type_t type_id, size_t hash_size, unsigned reserved,
- H5I_free_t free_func)
+ H5I_free_t free_func, H5I_free2_t free_aux)
{
H5I_id_type_t *type_ptr = NULL; /*ptr to the atomic type*/
H5I_type_t ret_value = H5I_BADID; /* type ID to return */
@@ -342,7 +342,7 @@ H5I_register_type(H5I_type_t type_id, size_t hash_size, unsigned reserved,
type_ptr->ids = 0;
type_ptr->nextid = reserved;
type_ptr->free_func = free_func;
- type_ptr->free_aux = NULL;
+ type_ptr->free_aux = free_aux;
type_ptr->id_list = (H5I_id_info_t **)H5MM_calloc(hash_size * sizeof(H5I_id_info_t *));
if(NULL == type_ptr->id_list)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_BADID, "memory allocation failed")
@@ -902,6 +902,118 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5I_register2
+ *
+ * Purpose: This routine does the same as H5I_register, and additionally
+ * attaches an auxilary structure to the id
+ *
+ * Return: Success: New object id.
+ * Failure: Negative
+ *
+ * Programmer: Mohamad Chaarawi
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5I_register2(H5I_type_t type, const void *object, const void *aux_object, hbool_t app_ref)
+{
+ H5I_id_type_t *type_ptr; /*ptr to the type */
+ H5I_id_info_t *id_ptr; /*ptr to the new ID information */
+ hid_t new_id = FAIL; /*new ID */
+ unsigned hash_loc; /*new item's hash table location*/
+ hid_t next_id; /*next ID to check */
+ H5I_id_info_t *curr_id; /*ptr to the current atom */
+ unsigned i; /*counter */
+ hid_t ret_value = FAIL; /*return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Check arguments */
+ if(type <= H5I_BADID || type >= H5I_next_type)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
+ type_ptr = H5I_id_type_list_g[type];
+ if(NULL == type_ptr || type_ptr->count <= 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
+ if(NULL == (id_ptr = H5FL_MALLOC(H5I_id_info_t)))
+ HGOTO_ERROR(H5E_ATOM, H5E_NOSPACE, FAIL, "memory allocation failed")
+
+ /* Create the struct & it's ID */
+ new_id = H5I_MAKE(type, type_ptr->nextid);
+ id_ptr->id = new_id;
+ id_ptr->count = 1; /*initial reference count*/
+ id_ptr->app_count = !!app_ref;
+ id_ptr->obj_ptr = object;
+ id_ptr->aux_ptr = aux_object;
+ id_ptr->next = NULL;
+
+ /* hash bucket already full, prepend to front of chain */
+ hash_loc = type_ptr->nextid % (unsigned)type_ptr->hash_size;
+ if(type_ptr->id_list[hash_loc] != NULL)
+ id_ptr->next = type_ptr->id_list[hash_loc];
+
+ /* Insert into the type */
+ type_ptr->id_list[hash_loc] = id_ptr;
+ type_ptr->ids++;
+ type_ptr->nextid++;
+
+ /*
+ * This next section of code checks for the 'nextid' getting too large and
+ * wrapping around, thus necessitating checking for duplicate IDs being
+ * handed out.
+ */
+ if(type_ptr->nextid > (unsigned)ID_MASK) {
+ type_ptr->wrapped = 1;
+ type_ptr->nextid = type_ptr->reserved;
+ } /* end if */
+
+ /*
+ * If we've wrapped around then we need to check for duplicate id's being
+ * handed out.
+ */
+ if(type_ptr->wrapped) {
+ /*
+ * Make sure we check all available ID's. If we're about at the end
+ * of the range then wrap around and check the beginning values. If
+ * we check all possible values and didn't find any free ones *then*
+ * we can fail.
+ */
+ for(i = type_ptr->reserved; i < ID_MASK; i++) {
+ /* Handle end of range by wrapping to beginning */
+ if(type_ptr->nextid > (unsigned)ID_MASK)
+ type_ptr->nextid = type_ptr->reserved;
+
+ /* new ID to check for */
+ next_id = H5I_MAKE(type, type_ptr->nextid);
+ hash_loc = (unsigned)H5I_LOC(type_ptr->nextid, type_ptr->hash_size);
+ curr_id = type_ptr->id_list[hash_loc];
+ if(curr_id == NULL)
+ break; /* Ha! this is not likely... */
+
+ while(curr_id) {
+ if(curr_id->id == next_id)
+ break;
+ curr_id = curr_id->next;
+ } /* end while */
+ if(!curr_id)
+ break; /* must not have found a match */
+ type_ptr->nextid++;
+ } /* end for */
+
+ if(i >= (unsigned)ID_MASK)
+ /* All the IDs are gone! */
+ HGOTO_ERROR(H5E_ATOM, H5E_NOIDS, FAIL, "no IDs available in type")
+ } /* end if */
+
+ /* Set return value */
+ ret_value = new_id;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5I_register2() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5I_subst
*
* Purpose: Substitute a new object pointer for the specified ID.
@@ -2327,231 +2439,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5I_get_file_id() */
-
-/*-------------------------------------------------------------------------
- * Function: H5I_register_type2
- *
- * Purpose: Creates a new type of ID's to give out. A specific number
- * (RESERVED) of type entries may be reserved to enable "constant"
- * values to be handed out which are valid IDs in the type, but
- * which do not map to any data structures and are not allocated
- * dynamically later. TYPE_ID is the H5I_type_t value of the type
- * to be initialized. If this value is zero, a new type is created.
- * If this value is one of the library types, that type is
- * initialized or its reference count is incremented (if it is already
- * initialized). HASH_SIZE is the minimum hash table size to
- * use for the type. FREE_FUNC is called with an object pointer
- * when the object is removed from the type.
- *
- * Return: Success: Type ID of the new type
- * Failure: H5I_BADID
- *
- * Programmers: Nathaniel Furrer
- * James Laird
- * Friday, April 30, 2004
- *
- *-------------------------------------------------------------------------
- */
-H5I_type_t
-H5I_register_type2(H5I_type_t type_id, size_t hash_size, unsigned reserved,
- H5I_free_t free_func, H5I_free2_t free_aux)
-{
- H5I_id_type_t *type_ptr = NULL; /*ptr to the atomic type*/
- H5I_type_t ret_value = H5I_BADID; /* type ID to return */
-
- FUNC_ENTER_NOAPI(H5I_BADID)
-
- /* Check that type_id is either a library type or zero */
- if(type_id < 0 || type_id >= H5I_NTYPES)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_BADID, "invalid type ID")
-
- if(type_id == 0) { /* Generate a new H5I_type_t value */
- /* Increment the number of types*/
- if(H5I_next_type < MAX_NUM_TYPES) {
- ret_value = H5I_next_type;
- H5_INC_ENUM(H5I_type_t, H5I_next_type);
- }
- else {
- hbool_t done; /* Indicate that search was successful */
- int i; /* Local index variable */
-
- /* Look for a free type to give out */
- done = FALSE;
- for(i = H5I_NTYPES; i < MAX_NUM_TYPES && done == FALSE; i++) {
- if(NULL == H5I_id_type_list_g[i]) {
- /* Found a free type ID */
- ret_value = (H5I_type_t)i;
- done = TRUE;
- } /* end if */
- } /* end for */
-
- /* Verify that we found a type to give out */
- if(done == FALSE)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded.")
- } /* end else */
- } /* end if */
- else /* type_id is a library type; use this value. */
- ret_value = type_id;
-
- /* Initialize the type */
-
- /* Check arguments */
-#ifdef HASH_SIZE_POWER_2
- if(!POWER_OF_TWO(hash_size) || hash_size == 1)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_BADID, "invalid hash size")
-#endif /* HASH_SIZE_POWER_2 */
-
- if(NULL == H5I_id_type_list_g[ret_value]) {
- /* Allocate the type information for new type */
- if(NULL == (type_ptr = (H5I_id_type_t *)H5MM_calloc(sizeof(H5I_id_type_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_BADID, "memory allocation failed")
- H5I_id_type_list_g[ret_value] = type_ptr;
- } /* end if */
- else {
- /* Get the pointer to the existing type */
- type_ptr = H5I_id_type_list_g[ret_value];
- } /* end else */
-
- if(type_ptr->count == 0) {
- /* Initialize the ID type structure for new types */
- type_ptr->hash_size = hash_size;
- type_ptr->reserved = reserved;
- type_ptr->wrapped = 0;
- type_ptr->ids = 0;
- type_ptr->nextid = reserved;
- type_ptr->free_func = free_func;
- type_ptr->free_aux = free_aux;
- type_ptr->id_list = (H5I_id_info_t **)H5MM_calloc(hash_size * sizeof(H5I_id_info_t *));
- if(NULL == type_ptr->id_list)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_BADID, "memory allocation failed")
- } /* end if */
-
- /* Increment the count of the times this type has been initialized */
- type_ptr->count++;
-
-done:
- if(ret_value == H5I_BADID) { /* Clean up on error */
- if(type_ptr != NULL) {
- H5MM_xfree(type_ptr->id_list);
- H5MM_xfree(type_ptr);
- } /* end if */
- } /* end if */
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5I_register_type() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5I_register2
- *
- * Purpose: This routine does the same as H5I_register, and additionally
- * attaches an auxilary structure to the id
- *
- * Return: Success: New object id.
- * Failure: Negative
- *
- * Programmer: Mohamad Chaarawi
- *
- *
- *-------------------------------------------------------------------------
- */
-hid_t
-H5I_register2(H5I_type_t type, const void *object, const void *aux_object, hbool_t app_ref)
-{
- H5I_id_type_t *type_ptr; /*ptr to the type */
- H5I_id_info_t *id_ptr; /*ptr to the new ID information */
- hid_t new_id = FAIL; /*new ID */
- unsigned hash_loc; /*new item's hash table location*/
- hid_t next_id; /*next ID to check */
- H5I_id_info_t *curr_id; /*ptr to the current atom */
- unsigned i; /*counter */
- hid_t ret_value = FAIL; /*return value */
-
- FUNC_ENTER_NOAPI(FAIL)
-
- /* Check arguments */
- if(type <= H5I_BADID || type >= H5I_next_type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
- type_ptr = H5I_id_type_list_g[type];
- if(NULL == type_ptr || type_ptr->count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type")
- if(NULL == (id_ptr = H5FL_MALLOC(H5I_id_info_t)))
- HGOTO_ERROR(H5E_ATOM, H5E_NOSPACE, FAIL, "memory allocation failed")
-
- /* Create the struct & it's ID */
- new_id = H5I_MAKE(type, type_ptr->nextid);
- id_ptr->id = new_id;
- id_ptr->count = 1; /*initial reference count*/
- id_ptr->app_count = !!app_ref;
- id_ptr->obj_ptr = object;
- id_ptr->aux_ptr = aux_object;
- id_ptr->next = NULL;
-
- /* hash bucket already full, prepend to front of chain */
- hash_loc = type_ptr->nextid % (unsigned)type_ptr->hash_size;
- if(type_ptr->id_list[hash_loc] != NULL)
- id_ptr->next = type_ptr->id_list[hash_loc];
-
- /* Insert into the type */
- type_ptr->id_list[hash_loc] = id_ptr;
- type_ptr->ids++;
- type_ptr->nextid++;
-
- /*
- * This next section of code checks for the 'nextid' getting too large and
- * wrapping around, thus necessitating checking for duplicate IDs being
- * handed out.
- */
- if(type_ptr->nextid > (unsigned)ID_MASK) {
- type_ptr->wrapped = 1;
- type_ptr->nextid = type_ptr->reserved;
- } /* end if */
-
- /*
- * If we've wrapped around then we need to check for duplicate id's being
- * handed out.
- */
- if(type_ptr->wrapped) {
- /*
- * Make sure we check all available ID's. If we're about at the end
- * of the range then wrap around and check the beginning values. If
- * we check all possible values and didn't find any free ones *then*
- * we can fail.
- */
- for(i = type_ptr->reserved; i < ID_MASK; i++) {
- /* Handle end of range by wrapping to beginning */
- if(type_ptr->nextid > (unsigned)ID_MASK)
- type_ptr->nextid = type_ptr->reserved;
-
- /* new ID to check for */
- next_id = H5I_MAKE(type, type_ptr->nextid);
- hash_loc = (unsigned)H5I_LOC(type_ptr->nextid, type_ptr->hash_size);
- curr_id = type_ptr->id_list[hash_loc];
- if(curr_id == NULL)
- break; /* Ha! this is not likely... */
-
- while(curr_id) {
- if(curr_id->id == next_id)
- break;
- curr_id = curr_id->next;
- } /* end while */
- if(!curr_id)
- break; /* must not have found a match */
- type_ptr->nextid++;
- } /* end for */
-
- if(i >= (unsigned)ID_MASK)
- /* All the IDs are gone! */
- HGOTO_ERROR(H5E_ATOM, H5E_NOIDS, FAIL, "no IDs available in type")
- } /* end if */
-
- /* Set return value */
- ret_value = new_id;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5I_register2() */
-
/*-------------------------------------------------------------------------
* Function: H5I_register_aux
*
diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h
index 0b240b9..1baad39 100644
--- a/src/H5Iprivate.h
+++ b/src/H5Iprivate.h
@@ -53,8 +53,8 @@
#define H5I_ERRSTK_HASHSIZE 64
/* Private Functions in H5I.c */
-H5_DLL H5I_type_t H5I_register_type(H5I_type_t type_id, size_t hash_size, unsigned reserved, H5I_free_t free_func);
-H5_DLL H5I_type_t H5I_register_type2(H5I_type_t type_id, size_t hash_size, unsigned reserved, H5I_free_t free_func, H5I_free2_t free_aux);
+H5_DLL H5I_type_t H5I_register_type(H5I_type_t type_id, size_t hash_size, unsigned reserved,
+ H5I_free_t free_func, H5I_free2_t free_aux);
H5_DLL int H5I_nmembers(H5I_type_t type);
H5_DLL herr_t H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref);
H5_DLL int H5I_destroy_type(H5I_type_t type);
diff --git a/src/H5Pint.c b/src/H5Pint.c
index b216ab3..4a80bef 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -357,9 +357,11 @@ H5P_init_interface(void)
/*
* Initialize the Generic Property class & object groups.
*/
- if(H5I_register_type(H5I_GENPROP_CLS, (size_t)H5I_GENPROPCLS_HASHSIZE, 0, (H5I_free_t)H5P_close_class) < 0)
+ if(H5I_register_type(H5I_GENPROP_CLS, (size_t)H5I_GENPROPCLS_HASHSIZE, 0,
+ (H5I_free_t)H5P_close_class, NULL) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group")
- if(H5I_register_type(H5I_GENPROP_LST, (size_t)H5I_GENPROPOBJ_HASHSIZE, 0, (H5I_free_t)H5P_close) < 0)
+ if(H5I_register_type(H5I_GENPROP_LST, (size_t)H5I_GENPROPOBJ_HASHSIZE, 0,
+ (H5I_free_t)H5P_close, NULL) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group")
/* Repeatedly pass over the list of property list classes for the library,
diff --git a/src/H5R.c b/src/H5R.c
index 4faf47b..dfb874e 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -83,7 +83,8 @@ H5R_init_interface(void)
FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the file IDs */
- if(H5I_register_type(H5I_REFERENCE, (size_t)H5I_REFID_HASHSIZE, H5R_RESERVED_ATOMS, (H5I_free_t)NULL) < 0)
+ if(H5I_register_type(H5I_REFERENCE, (size_t)H5I_REFID_HASHSIZE, H5R_RESERVED_ATOMS,
+ (H5I_free_t)NULL, NULL) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to initialize interface");
done:
diff --git a/src/H5S.c b/src/H5S.c
index 5d99066..7cf87b2 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -78,7 +78,8 @@ H5S_init_interface(void)
FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the file IDs */
- if(H5I_register_type(H5I_DATASPACE, (size_t)H5I_DATASPACEID_HASHSIZE, H5S_RESERVED_ATOMS, (H5I_free_t)H5S_close) < 0)
+ if(H5I_register_type(H5I_DATASPACE, (size_t)H5I_DATASPACEID_HASHSIZE, H5S_RESERVED_ATOMS,
+ (H5I_free_t)H5S_close, NULL) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize interface")
#ifdef H5_HAVE_PARALLEL
diff --git a/src/H5T.c b/src/H5T.c
index aa42be5..ccb0d15 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -742,7 +742,7 @@ H5T_init_interface(void)
FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the file IDs */
- if(H5I_register_type2(H5I_DATATYPE, (size_t)H5I_DATATYPEID_HASHSIZE, H5T_RESERVED_ATOMS,
+ if(H5I_register_type(H5I_DATATYPE, (size_t)H5I_DATATYPEID_HASHSIZE, H5T_RESERVED_ATOMS,
(H5I_free_t)H5T_close, (H5I_free2_t)H5T_close_datatype)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface")
diff --git a/src/H5VL.c b/src/H5VL.c
index 2c08e0e..46a0770 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -98,7 +98,8 @@ H5VL_init_interface(void)
FUNC_ENTER_NOAPI_NOINIT
/* register VOL ID type */
- if(H5I_register_type(H5I_VOL, (size_t)H5I_VOL_HASHSIZE, 0, (H5I_free_t)H5VL_free_cls)<H5I_FILE)
+ if(H5I_register_type(H5I_VOL, (size_t)H5I_VOL_HASHSIZE, 0,
+ (H5I_free_t)H5VL_free_cls, NULL)<H5I_FILE)
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to initialize interface")
done: