summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5I.c15
-rw-r--r--src/H5Iprivate.h2
-rw-r--r--src/H5T.c2
-rw-r--r--src/H5Tcommit.c4
-rw-r--r--src/H5Tdeprec.c2
-rw-r--r--src/H5VLnative.c15
6 files changed, 13 insertions, 27 deletions
diff --git a/src/H5I.c b/src/H5I.c
index a48a544..1be0d4f 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -2483,26 +2483,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5I_register_aux(hid_t id, void *aux_ptr, H5I_free2_t free_func)
+H5I_register_aux(hid_t id, void *aux_ptr)
{
- H5I_id_type_t *type_ptr = NULL; /*ptr to the type*/
H5I_id_info_t *id_ptr = NULL; /*ptr to the id*/
- H5I_type_t type;
herr_t ret_value = SUCCEED; /*return value*/
FUNC_ENTER_NOAPI_NOINIT
- /* Check arguments */
- type = H5I_TYPE(id);
- if (type <= H5I_BADID || type >= H5I_next_type)
- HGOTO_DONE(FAIL);
-
- type_ptr = H5I_id_type_list_g[type];
- if (!type_ptr || type_ptr->count <= 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "invalid type")
-
- type_ptr->cls->free_aux = free_func;
-
if(NULL == (id_ptr = H5I_find_id(id)))
HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "Invalid ID")
diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h
index 5f9604e..fe07ced 100644
--- a/src/H5Iprivate.h
+++ b/src/H5Iprivate.h
@@ -91,7 +91,7 @@ H5_DLL int H5I_dec_app_ref_always_close(hid_t id);
H5_DLL int H5I_inc_type_ref(H5I_type_t type);
H5_DLL herr_t H5I_dec_type_ref(H5I_type_t type);
H5_DLL int H5I_get_type_ref(H5I_type_t type);
-H5_DLL herr_t H5I_register_aux(hid_t id, void *aux_ptr, H5I_free2_t free_func);
+H5_DLL herr_t H5I_register_aux(hid_t id, void *aux_ptr);
H5_DLL void *H5I_get_aux(hid_t id);
H5_DLL hid_t H5I_get_id(void *object, H5I_type_t type);
#endif /* _H5Iprivate_H */
diff --git a/src/H5T.c b/src/H5T.c
index 86e49de..1930bc5 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -526,7 +526,7 @@ static struct {
H5FL_DEFINE_STATIC(H5T_path_t);
/* Datatype ID class */
-static H5I_class_t H5I_DATATYPE_CLS[1] = {{
+static const H5I_class_t H5I_DATATYPE_CLS[1] = {{
H5I_DATATYPE, /* ID class value */
0, /* Class flags */
64, /* Minimum hash size for class */
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 0945dd0..4566bc2 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -184,7 +184,7 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
type->vol_obj = dt;
/* attach VOL information to the ID */
- if (H5I_register_aux(type_id, vol_plugin, (H5I_free2_t)H5T_close_datatype) < 0)
+ if (H5I_register_aux(type_id, vol_plugin) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
done:
@@ -348,7 +348,7 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
type->vol_obj = dt;
/* attach VOL information to the ID */
- if (H5I_register_aux(type_id, vol_plugin, (H5I_free2_t)H5T_close_datatype) < 0)
+ if (H5I_register_aux(type_id, vol_plugin) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
done:
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index 049c474..b59591a 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -165,7 +165,7 @@ H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
type->vol_obj = dt;
/* attach VOL information to the ID */
- if (H5I_register_aux(type_id, vol_plugin, (H5I_free2_t)H5T_close_datatype) < 0)
+ if (H5I_register_aux(type_id, vol_plugin) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
done:
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index ef06ae7..c9560c8 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -147,7 +147,7 @@ static H5VL_class_t H5VL_native_g = {
{ /* datatype_cls */
H5VL_native_datatype_commit, /* commit */
H5VL_native_datatype_open, /* open */
- H5VL_native_datatype_get_binary, /* get_size */
+ H5VL_native_datatype_get_binary, /* get_size */
H5VL_native_datatype_close /* close */
},
{ /* dataset_cls */
@@ -185,8 +185,6 @@ static H5VL_class_t H5VL_native_g = {
H5VL_native_object_open, /* open */
H5VL_native_object_copy, /* copy */
H5VL_native_object_visit, /* visit */
- //H5VL_native_object_lookup, /* lookup */
- //H5VL_native_object_free_loc, /* free location */
H5VL_native_object_get, /* get */
H5VL_native_object_misc, /* misc */
H5VL_native_object_optional, /* optional */
@@ -328,9 +326,10 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5VL_native_register_with_aux
+ * Function: H5VL_native_register
*
- * Purpose: utility routine to register the native VOL plugin to an ID
+ * Purpose: utility routine to register and ID with the native VOL plugin
+ * as an auxilary object
*
* Returns: Non-negative on success or negative on failure
*
@@ -343,8 +342,8 @@ hid_t
H5VL_native_register(H5I_type_t type, void *obj, hbool_t app_ref)
{
H5VL_t *vol_plugin; /* VOL plugin information */
- H5T_t *dt = NULL;
- hid_t ret_value = FAIL;
+ H5T_t *dt = NULL;
+ hid_t ret_value = FAIL;
FUNC_ENTER_NOAPI_NOINIT
@@ -395,7 +394,7 @@ herr_t
H5Pset_fapl_native(hid_t fapl_id)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value;
+ herr_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", fapl_id);