summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2002-08-28 18:34:12 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2002-08-28 18:34:12 (GMT)
commit7bff4eb559d3f28f27ab29ced0d1e46ada1df620 (patch)
tree26415f62114ac52c107ef88cacfb58218facbefa /src/H5D.c
parentfc5e3b4897f695b2d61518954047cc783c8baa1d (diff)
downloadhdf5-7bff4eb559d3f28f27ab29ced0d1e46ada1df620.zip
hdf5-7bff4eb559d3f28f27ab29ced0d1e46ada1df620.tar.gz
hdf5-7bff4eb559d3f28f27ab29ced0d1e46ada1df620.tar.bz2
[svn-r5904]
Purpose: Added 'ID to name' support Description: There is a new API function H5Iget_name Most of the changes are on H5G.c , regarding the symbol table entry struct H5G_entry_t which has 2 new fields 'name' and 'old_name' A new private function was introduced H5G_ent_copy, that does a deep copy between 2 symbol table entries The test file is getname.c Platforms tested: windows 2000, Linux, Solaris
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 577e25f..a15f00d 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1958,6 +1958,9 @@ done:
* Feb 26, 2002
* A new fill value message and two new properties are added.
*
+ * Pedro Vicente, <pvn@ncsa.uiuc.edu> 22 Aug 2002
+ * Added a deep copy of the symbol table entry
+ *
*-------------------------------------------------------------------------
*/
H5D_t *
@@ -1982,8 +1985,10 @@ H5D_open_oid(H5G_entry_t *ent)
if(NULL==(dataset = H5D_new(H5P_DEFAULT)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
- /* Copy over the symbol table information if it's provided */
- HDmemcpy(&(dataset->ent),ent,sizeof(H5G_entry_t));
+ /* Deep copy of the symbol table entry */
+ if (H5G_ent_copy(ent,&(dataset->ent))<0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "unable to copy entry");
+
/* Find the dataset object */
if (H5O_open(&(dataset->ent)) < 0)