summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-07-16 23:43:29 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-07-16 23:43:29 (GMT)
commit1e612c3a46880773d53ad315f3aef2104abb9347 (patch)
tree1259838b4fe2f3bb8ca78c8f0b4dea00557c89d1 /src/H5F.c
parent5e94d0336fa7a0ebc0a25d002b413221284691b6 (diff)
parent75f4e51a1a076ea2f1602619e2a7d7bcce13c2f1 (diff)
downloadhdf5-1e612c3a46880773d53ad315f3aef2104abb9347.zip
hdf5-1e612c3a46880773d53ad315f3aef2104abb9347.tar.gz
hdf5-1e612c3a46880773d53ad315f3aef2104abb9347.tar.bz2
[svn-r22584] merge from trunk and resolve type ID registration
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c37
1 files changed, 32 insertions, 5 deletions
diff --git a/src/H5F.c b/src/H5F.c
index d79a736..efbf7ec 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -13,13 +13,19 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/****************/
+/* Module Setup */
+/****************/
+
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Interface initialization */
#define H5_INTERFACE_INIT_FUNC H5F__init_pub_interface
-/* Packages needed by this file... */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
@@ -41,7 +47,6 @@
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
@@ -54,6 +59,16 @@
/* Local Variables */
/*******************/
+/* File ID class */
+static const H5I_class_t H5I_FILE_CLS[1] = {{
+ H5I_FILE, /* ID class value */
+ 0, /* Class flags */
+ 64, /* Minimum hash size for class */
+ 0, /* # of reserved IDs for class */
+ NULL, /* Callback routine for closing objects of this class */
+ (H5I_free2_t)H5F_close_file /* Callback routine for closing auxilary objects of this class */
+}};
+
/*--------------------------------------------------------------------------
NAME
@@ -76,8 +91,7 @@ H5F__init_pub_interface(void)
/*
* Initialize the atom group for the file IDs.
*/
- if(H5I_register_type(H5I_FILE, (size_t)H5I_FILEID_HASHSIZE, 0,
- NULL, (H5I_free2_t)H5F_close_file)<H5I_FILE)
+ if(H5I_register_type(H5I_FILE_CLS) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to initialize interface")
ret_value = H5F_init();
@@ -107,10 +121,23 @@ H5F_init(void)
FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
+#if 0
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /*
+ * Initialize the atom group for the file IDs.
+ */
+ if(H5I_register_type(H5I_FILE_CLS) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to initialize interface")
+
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_init() */
+} /* end H5F_init_interface() */
+#endif
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F_init() */
/*-------------------------------------------------------------------------