summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-11-02 04:54:19 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-11-02 04:54:19 (GMT)
commit19c9657f7c4029df52a804c7ed8b4d3b30cc6196 (patch)
tree6601816880f90040ae67df5bd27558c0f0670e86 /src/H5G.c
parent0f84d2fb15813c10fca48f95772626c34039619d (diff)
downloadhdf5-19c9657f7c4029df52a804c7ed8b4d3b30cc6196.zip
hdf5-19c9657f7c4029df52a804c7ed8b4d3b30cc6196.tar.gz
hdf5-19c9657f7c4029df52a804c7ed8b4d3b30cc6196.tar.bz2
[svn-r12842] Description:
Refactor generic property list initialization code to put property list specific routines in property list modules, instead of scattered to the four winds. Also, introduce property list class initialization objects, to make adding new property list classes in the library easier. Fix daily test failure by using H5Pget_elink_prefix() API routine instead of looking at the "raw" generic property list information. Tested on: Mac OS X/32 10.4.8 (amazon) FreeBSD/32 4.11 (sleipnir) w/threadsafe Linux/32 2.4 (heping) w/C++ & FORTRAN Linux/64 2.4 (mir) w/build-all & 1.6 compat
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c54
1 files changed, 5 insertions, 49 deletions
diff --git a/src/H5G.c b/src/H5G.c
index c7c0be0..897dbbe 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -1151,61 +1151,17 @@ done:
static herr_t
H5G_init_interface(void)
{
- H5P_genclass_t *crt_pclass, *acc_pclass, *cpy_pclass;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_init_interface);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_init_interface)
/* 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)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface");
-
- /* ========== Group Creation Property Class Initialization ============*/
- assert(H5P_CLS_GROUP_CREATE_g!=-1);
-
- /* Get the pointer to group creation class */
- if(NULL == (crt_pclass = H5I_object(H5P_CLS_GROUP_CREATE_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
-
- /* Only register the default property list if it hasn't been created yet */
- if(H5P_LST_GROUP_CREATE_g == (-1)) {
- /* Register the default group creation property list */
- if((H5P_LST_GROUP_CREATE_g = H5P_create_id(crt_pclass))<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class")
- } /* end if */
-
- /* ========== Group Access Property Class Initialization ============*/
- assert(H5P_CLS_GROUP_ACCESS_g!=-1);
-
- /* Get the pointer to group creation class */
- if(NULL == (acc_pclass = H5I_object(H5P_CLS_GROUP_ACCESS_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
-
- /* Only register the default property list if it hasn't been created yet */
- if(H5P_LST_GROUP_ACCESS_g == (-1)) {
- /* Register the default group creation property list */
- if((H5P_LST_GROUP_ACCESS_g = H5P_create_id(acc_pclass))<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class")
- } /* end if */
-
- /* ========== Object Copy Property Class Initialization ============*/
- assert(H5P_CLS_OBJECT_COPY_g!=-1);
-
- /* Get the pointer to group access class */
- if(NULL == (cpy_pclass = H5I_object(H5P_CLS_OBJECT_COPY_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
-
- /* Only register the default property list if it hasn't been created yet */
- if(H5P_LST_OBJECT_COPY_g == (-1)) {
- /* Register the default group access property list */
- if((H5P_LST_OBJECT_COPY_g = H5P_create_id(cpy_pclass))<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class")
- } /* end if */
+ if(H5I_register_type(H5I_GROUP, (size_t)H5I_GROUPID_HASHSIZE, H5G_RESERVED_ATOMS, (H5I_free_t)H5G_close) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface")
done:
- FUNC_LEAVE_NOAPI(ret_value);
-}
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5G_init_interface() */
/*-------------------------------------------------------------------------