diff options
author | Robb Matzke <matzke@llnl.gov> | 1997-11-07 05:16:53 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1997-11-07 05:16:53 (GMT) |
commit | 73897627660169de753597b9ff045d3112646506 (patch) | |
tree | b02e9ffd202a7448cdf4bc0bdfe5da728dde862b /src/H5Gshad.c | |
parent | 833e82fec5f654c1ed93a6e4e4266f280e20311c (diff) | |
download | hdf5-73897627660169de753597b9ff045d3112646506.zip hdf5-73897627660169de753597b9ff045d3112646506.tar.gz hdf5-73897627660169de753597b9ff045d3112646506.tar.bz2 |
[svn-r135] ./config/linux
./config/freebsd2.2.1
Rewritten to be more flexible.
./src/H5AC.c
./src/H5ACprivate.h
./src/H5F.c
./src/H5H.c
./src/H5Gpkg.h
./src/H5Gshad.c
./src/H5O.c
./test/istore.c
./test/tstab.c
Accumulates cache statistics and displays the results on
stderr when the file is closed if it was opened with
H5F_ACC_DEBUG passed into H5F_open()
./src/H5B.c
./src/H5Bprivate.h
./src/H5Fistore.c
./src/H5Gnode.c
Added more debugging which is turned on if H5B_DEBUG is
defined on the compile command (see config/linux).
Fixed a couple of bugs with left insertions which are used by
the indexed storage stuff.
./src/H5Flow.c
Fixed a memory leak.
./src/H5Fprivate.h
Fixed warnings about shifting more than size of object.
./src/H5Fstdio.c
Fixed seek optimizations back to the way Quincey originally
had them.
./src/H5V.c
Removed unused variables.
Diffstat (limited to 'src/H5Gshad.c')
-rw-r--r-- | src/H5Gshad.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/H5Gshad.c b/src/H5Gshad.c index 875f880..253e01e 100644 --- a/src/H5Gshad.c +++ b/src/H5Gshad.c @@ -299,7 +299,7 @@ H5G_shadow_list (H5F_t *f, haddr_t grp_addr) *------------------------------------------------------------------------- */ herr_t -H5G_shadow_assoc_node (H5F_t *f, H5G_node_t *sym, H5G_ac_ud1_t *ac_udata) +H5G_shadow_assoc_node (H5F_t *f, H5G_node_t *sym, const H5G_ac_ud1_t *ac_udata) { H5G_shadow_t *shadow = NULL; const char *s = NULL; @@ -395,7 +395,21 @@ H5G_shadow_open (H5F_t *f, H5G_entry_t *grp, H5G_entry_t *ent) } + /* + * Build the new shadow. + */ shadow = H5MM_xcalloc (1, sizeof(H5G_shadow_t)); + ent->shadow = shadow; + shadow->main = ent; + shadow->nrefs = 1; + shadow->entry = *ent; + shadow->entry.dirty = FALSE; + shadow->grp_addr = grp_addr; + + /* + * Give the shadow a name. Obtaining the name might remove ENT from the + * cache, so we're careful not to reference it again. + */ if (ent==f->shared->root_sym && 0==grp_addr) { /* * We're opening the root entry. @@ -419,16 +433,8 @@ H5G_shadow_open (H5F_t *f, H5G_entry_t *grp, H5G_entry_t *ent) } shadow->name = H5MM_xstrdup (s); } - - /* - * Build the new shadow. - */ - ent->shadow = shadow; - shadow->main = ent; - shadow->nrefs = 1; - shadow->entry = *ent; - shadow->entry.dirty = FALSE; - shadow->grp_addr = grp_addr; + ent = NULL; /*previous ops might have invalidated it*/ + /* * Link it into the shadow heap |