summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-07-16 20:28:44 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-07-16 20:28:44 (GMT)
commit43995f12ac694455b3ca42292eb8cea15c08817e (patch)
treeaec930ca82315c1dec81579aff20bc12c1db67db /src/H5Dint.c
parent0f43d84b3c7292bfb7d51218f02738028f818ff0 (diff)
downloadhdf5-43995f12ac694455b3ca42292eb8cea15c08817e.zip
hdf5-43995f12ac694455b3ca42292eb8cea15c08817e.tar.gz
hdf5-43995f12ac694455b3ca42292eb8cea15c08817e.tar.bz2
[svn-r22583] Description:
Bring r22582 from trunk to 1.8 branch: 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 fc7209a..7e5f3c1 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 */