summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.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/H5Dint.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/H5Dint.c')
-rw-r--r--src/H5Dint.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 62d0f09..f313e52 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -106,6 +106,15 @@ H5FL_EXTERN(H5D_chunk_info_t);
/* Define a static "default" dataset structure to use to initialize new datasets */
static H5D_shared_t H5D_def_dset;
+/* Dataset ID class */
+static const H5I_class_t H5I_DATASET_CLS[1] = {{
+ H5I_DATASET, /* ID class value */
+ 0, /* Class flags */
+ 64, /* Minimum hash size for class */
+ 0, /* # of reserved IDs for class */
+ (H5I_free_t)H5D_close /* Callback routine for closing objects of this class */
+}};
+
/*-------------------------------------------------------------------------
@@ -159,7 +168,7 @@ H5D__init_interface(void)
FUNC_ENTER_STATIC
/* Initialize the atom group for the dataset IDs */
- if(H5I_register_type(H5I_DATASET, (size_t)H5I_DATASETID_HASHSIZE, H5D_RESERVED_ATOMS, (H5I_free_t)H5D_close)<H5I_FILE)
+ if(H5I_register_type(H5I_DATASET_CLS) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize interface")
/* Reset the "default dataset" information */