diff options
author | James Laird <jlaird@hdfgroup.org> | 2006-08-18 20:48:54 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2006-08-18 20:48:54 (GMT) |
commit | 75d22ed839a6b7a5e048ac52708d04eb4ad590d3 (patch) | |
tree | 6a564780972e92f08cd4f8fd633945dd10180401 /src/H5Oprivate.h | |
parent | e8c1fdd5545240b47ea996be3db3fa9e27fb42a0 (diff) | |
download | hdf5-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/H5Oprivate.h')
-rw-r--r-- | src/H5Oprivate.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 07d2468..4a6a0c5 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -65,6 +65,8 @@ typedef struct H5O_t H5O_t; typedef struct H5O_loc_t { H5F_t *file; /* File that object header is located within */ haddr_t addr; /* File address of object header */ + hbool_t holding_file; /* True if this object header has incremented + * its file's count of open objects. */ } H5O_loc_t; /* Settings/flags for copying an object */ @@ -383,6 +385,8 @@ H5_DLL void *H5O_link_copy(const void *_mesg, void *_dest, unsigned update_flags */ H5_DLL herr_t H5O_loc_reset(H5O_loc_t *loc); H5_DLL herr_t H5O_loc_copy(H5O_loc_t *dst, const H5O_loc_t *src, H5_copy_depth_t depth); +H5_DLL herr_t H5O_loc_hold_file(H5O_loc_t *loc); +H5_DLL herr_t H5O_loc_free(H5O_loc_t *loc); /* Layout operators */ H5_DLL size_t H5O_layout_meta_size(const H5F_t *f, const void *_mesg); |