summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-07-16 19:54:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-07-16 19:54:26 (GMT)
commit75f4e51a1a076ea2f1602619e2a7d7bcce13c2f1 (patch)
treeb6e08ce3ecbd535ffe74269d7e44c905e19b137d /src/H5G.c
parent2e3ab09a520ff87ec709b5997273ce7f3b99d9ed (diff)
downloadhdf5-75f4e51a1a076ea2f1602619e2a7d7bcce13c2f1.zip
hdf5-75f4e51a1a076ea2f1602619e2a7d7bcce13c2f1.tar.gz
hdf5-75f4e51a1a076ea2f1602619e2a7d7bcce13c2f1.tar.bz2
[svn-r22582] Description:
Refactor ID class registration to be more like how other "class"s in the library are registered, and clean up compiler warnings. Tested on: Mac OSX/64 10.7.4 (amazon) w/debug (Too minor to require h5comittest)
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/H5G.c b/src/H5G.c
index 3883ade..a0e7767 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -100,8 +100,6 @@
/* Local Macros */
/****************/
-#define H5G_RESERVED_ATOMS 0
-
/******************/
/* Local Typedefs */
@@ -132,6 +130,15 @@
/* Local Variables */
/*******************/
+/* Group ID class */
+static const H5I_class_t H5I_GROUP_CLS[1] = {{
+ H5I_GROUP, /* ID class value */
+ 0, /* Class flags */
+ 64, /* Minimum hash size for class */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5G_close /* Callback routine for closing objects of this class */
+}};
+
/*-------------------------------------------------------------------------
@@ -187,7 +194,7 @@ H5G_init_interface(void)
FUNC_ENTER_NOAPI_NOINIT
/* Initialize the atom group for the group IDs */
- if(H5I_register_type(H5I_GROUP, (size_t)H5I_GROUPID_HASHSIZE, H5G_RESERVED_ATOMS, (H5I_free_t)H5G_close) < 0)
+ if(H5I_register_type(H5I_GROUP_CLS) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface")
done: