summaryrefslogtreecommitdiffstats
path: root/src/H5Gprivate.h
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2006-08-18 20:48:54 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2006-08-18 20:48:54 (GMT)
commit75d22ed839a6b7a5e048ac52708d04eb4ad590d3 (patch)
tree6a564780972e92f08cd4f8fd633945dd10180401 /src/H5Gprivate.h
parente8c1fdd5545240b47ea996be3db3fa9e27fb42a0 (diff)
downloadhdf5-75d22ed839a6b7a5e048ac52708d04eb4ad590d3.zip
hdf5-75d22ed839a6b7a5e048ac52708d04eb4ad590d3.tar.gz
hdf5-75d22ed839a6b7a5e048ac52708d04eb4ad590d3.tar.bz2
[svn-r12596] Refactored how external files are opened and closed.
Object header locations (H5O_loc_t's) can now "hold open" a file and decrement its open object count when they close. This means that locations (H5O_loc_t's and H5G_loc_t's) should always be freed. Added more thorough tests to ensure that external files are closed.
Diffstat (limited to 'src/H5Gprivate.h')
-rw-r--r--src/H5Gprivate.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index d4278a4..acef4a3 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -87,6 +87,14 @@ typedef enum {
H5G_NAME_UNMOUNT /* H5Funmount call */
} H5G_names_op_t;
+/* Status returned from traversal callbacks; whether the object location
+ * or group location need to be closed */
+#define H5G_OWN_NONE 0
+#define H5G_OWN_OBJ_LOC 1
+#define H5G_OWN_GRP_LOC 2
+#define H5G_OWN_BOTH 3
+typedef int H5G_own_loc_t;
+
/* Structure to store information about the name an object was opened with */
typedef struct {
H5RS_str_t *full_path_r; /* Path to object, as seen from root of current file mounting hierarchy */
@@ -124,7 +132,8 @@ H5_DLL H5G_t *H5G_open(H5G_loc_t *loc, hid_t dxpl_id);
H5_DLL herr_t H5G_close(H5G_t *grp);
H5_DLL herr_t H5G_get_objinfo(const H5G_loc_t *loc, const char *name,
hbool_t follow_link, H5G_stat_t *statbuf/*out*/, hid_t dxpl_id);
-H5_DLL H5F_t *H5G_insertion_file(H5G_loc_t *loc, const char *name, hid_t dxpl_id);
+H5_DLL herr_t H5G_insertion_loc(H5G_loc_t *src_loc, const char *name,
+ H5G_loc_t *insertion_loc/*out*/, hid_t dxpl_id);
H5_DLL herr_t H5G_free_grp_name(H5G_t *grp);
H5_DLL herr_t H5G_get_shared_count(H5G_t *grp);
H5_DLL herr_t H5G_mount(H5G_t *grp);