diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-07-16 20:28:44 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-07-16 20:28:44 (GMT) |
commit | 43995f12ac694455b3ca42292eb8cea15c08817e (patch) | |
tree | aec930ca82315c1dec81579aff20bc12c1db67db /src/H5FD.c | |
parent | 0f43d84b3c7292bfb7d51218f02738028f818ff0 (diff) | |
download | hdf5-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/H5FD.c')
-rw-r--r-- | src/H5FD.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -114,6 +114,16 @@ static int H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*o */ static unsigned long file_serial_no; +/* File driver ID class */ +static const H5I_class_t H5I_VFL_CLS[1] = {{ + H5I_VFL, /* ID class value */ + 0, /* Class flags */ + 64, /* Minimum hash size for class */ + 0, /* # of reserved IDs for class */ + (H5I_free_t)H5FD_free_cls /* Callback routine for closing objects of this class */ +}}; + + /*------------------------------------------------------------------------- * Function: H5FD_init @@ -164,7 +174,7 @@ 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_CLS) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize interface") /* Reset the file serial numbers */ |