summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-10-31 21:02:16 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-10-31 21:02:16 (GMT)
commit0b8b8df0e0e9e8dbf3eb5a9e03035094dd5c49d9 (patch)
tree8b6e718965370d68d2795bc92eff8ba3d63d1cc2 /src
parent6f6b6bb5e880b0c8f7472847e9b1b2cf498d4e35 (diff)
downloadhdf5-0b8b8df0e0e9e8dbf3eb5a9e03035094dd5c49d9.zip
hdf5-0b8b8df0e0e9e8dbf3eb5a9e03035094dd5c49d9.tar.gz
hdf5-0b8b8df0e0e9e8dbf3eb5a9e03035094dd5c49d9.tar.bz2
[svn-r7803] Purpose:
Minor code cleanup Description: Fixed up comments, made the H5I_get_file_id() routine static, removed H5Gprivate from including itself... Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest
Diffstat (limited to 'src')
-rw-r--r--src/H5F.c6
-rw-r--r--src/H5Gprivate.h1
-rw-r--r--src/H5I.c3
-rw-r--r--src/H5Iprivate.h1
4 files changed, 5 insertions, 6 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 4ee3441..c8d9bf2 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -4186,9 +4186,8 @@ done:
/*-------------------------------------------------------------------------
* Function: H5F_get_id
*
- * Purpose: Quick and dirty routine to retrieve the file's 'file id'
- * (Mainly added to stop non-file routines from poking about
- * in the H5F_t data structure)
+ * Purpose: Get the file ID, incrementing it, or "resurrecting" it as
+ * appropriate.
*
* Return: Non-negative on success/Negative on failure
*
@@ -4206,6 +4205,7 @@ H5F_get_id(H5F_t *file)
FUNC_ENTER_NOINIT(H5F_get_id)
assert(file);
+
if(file->file_id == -1) {
if(H5I_remove(file->closing)==NULL)
HGOTO_ERROR(H5E_ATOM, H5E_READERROR, FAIL, "unable to remove from closing list")
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index b2bff6c..2bf2c3f 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -38,7 +38,6 @@
#include "H5private.h" /* Generic Functions */
#include "H5Bprivate.h" /* B-trees */
#include "H5Fprivate.h" /* File access */
-#include "H5Gprivate.h" /* Group */
#include "H5RSprivate.h" /* Reference-counted strings */
/*
diff --git a/src/H5I.c b/src/H5I.c
index c2ee0ea..51e9cf8 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -117,6 +117,7 @@ H5FL_DEFINE_STATIC(H5I_id_info_t);
/*--------------------- Local function prototypes ---------------------------*/
static herr_t H5I_init_interface(void);
static H5I_id_info_t *H5I_find_id(hid_t id);
+static hid_t H5I_get_file_id(hid_t obj_id);
#ifdef H5I_DEBUG_OUTPUT
static herr_t H5I_debug(H5I_type_t grp);
#endif /* H5I_DEBUG_OUTPUT */
@@ -842,7 +843,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-hid_t
+static hid_t
H5I_get_file_id(hid_t obj_id)
{
H5G_entry_t *ent;
diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h
index 42369e3..79819a5 100644
--- a/src/H5Iprivate.h
+++ b/src/H5Iprivate.h
@@ -67,7 +67,6 @@ H5_DLL hid_t H5I_register(H5I_type_t grp, void *object);
H5_DLL void *H5I_object(hid_t id);
H5_DLL void *H5I_object_verify(hid_t id, H5I_type_t id_type);
H5_DLL H5I_type_t H5I_get_type(hid_t id);
-H5_DLL hid_t H5I_get_file_id(hid_t obj_id);
H5_DLL void *H5I_remove(hid_t id);
H5_DLL void *H5I_search(H5I_type_t grp, H5I_search_func_t func, void *key);
H5_DLL int H5I_inc_ref(hid_t id);