summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2003-10-29 17:04:58 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2003-10-29 17:04:58 (GMT)
commitd1f7c81a466c0bf041c380abee0f0c21ca30c86f (patch)
tree960def503380ca7737e93ae841bc2d4148b9d271 /src/H5F.c
parent219f713c6fdea98da7c1fdbb0eafa60a5f0bbe99 (diff)
downloadhdf5-d1f7c81a466c0bf041c380abee0f0c21ca30c86f.zip
hdf5-d1f7c81a466c0bf041c380abee0f0c21ca30c86f.tar.gz
hdf5-d1f7c81a466c0bf041c380abee0f0c21ca30c86f.tar.bz2
[svn-r7784] *** empty log message ***
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/H5F.c b/src/H5F.c
index b01cbff..dd9a3d6 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2137,6 +2137,9 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
if ((ret_value = H5I_register(H5I_FILE, new_file))<0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file")
+ /* Keep this ID in file object structure */
+ new_file->file_id = ret_value;
+
done:
if (ret_value<0 && new_file)
if(H5F_close(new_file)<0)
@@ -4164,6 +4167,36 @@ 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)
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * Oct 29, 2003
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5F_get_id(H5F_t *file)
+{
+ hid_t ret_value;
+
+ FUNC_ENTER_NOINIT(H5F_get_id)
+
+ assert(file);
+ ret_value = file->file_id;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F_get_id() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5F_get_base_addr
*
* Purpose: Quick and dirty routine to retrieve the file's 'base_addr' value