summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-09-12 06:02:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-09-12 06:02:55 (GMT)
commit5ffde305cdf2c167234f1ffb38adf557380f2234 (patch)
treef211c5a72d7332885ab83eca1270bcb131e1c6c9 /src/H5G.c
parent966f5f42368663fb589807ae28b2887b98ed8067 (diff)
downloadhdf5-5ffde305cdf2c167234f1ffb38adf557380f2234.zip
hdf5-5ffde305cdf2c167234f1ffb38adf557380f2234.tar.gz
hdf5-5ffde305cdf2c167234f1ffb38adf557380f2234.tar.bz2
[svn-r11384] Purpose:
Code cleanup Description: Merge back changes from "compact group" work that improve the infrastructure of the library and may impact others. In this round of merging, that includes: - Move datatype allocation into single internal routine, instead of duplicated code that was spread out in a dozen or so places. - Clean up guts of object header routines (H5O_*) to allow for some of the fancieroperations that need to be performed on groups, along with some general improvements. - Added a new error code - Some minor cleanups in other code.... Platforms tested: FreeBSD 4.11 (sleipnir) Linux 2.4 Mac OS X
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/H5G.c b/src/H5G.c
index a453d57..92575e2 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -1837,7 +1837,10 @@ H5G_mkroot (H5F_t *f, hid_t dxpl_id, H5G_entry_t *ent)
H5FL_FREE(H5G_t, f->shared->root_grp);
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
}
- f->shared->root_grp->ent = *ent;
+ /* Shallow copy (take ownership) of the group entry object */
+ if(H5G_ent_copy(&(f->shared->root_grp->ent), ent, H5G_COPY_SHALLOW)<0)
+ HGOTO_ERROR (H5E_SYM, H5E_CANTCOPY, FAIL, "can't copy group entry")
+
f->shared->root_grp->shared->fo_count = 1;
assert (1==f->nopen_objs);
f->nopen_objs = 0;
@@ -3096,7 +3099,7 @@ H5G_set_comment(H5G_entry_t *loc, const char *name, const char *buf, hid_t dxpl_
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found");
/* Remove the previous comment message if any */
- if (H5O_remove(&obj_ent, H5O_NAME_ID, 0, dxpl_id)<0)
+ if (H5O_remove(&obj_ent, H5O_NAME_ID, 0, TRUE, dxpl_id)<0)
H5E_clear_stack(NULL);
/* Add the new message */