summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-02-24 21:08:02 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-02-24 21:08:02 (GMT)
commit9f514c2b7de0d07cfcb26d3e2355e070033f7a11 (patch)
tree0535e4e342df7cd2e7482d64458346a804353c76
parenta3e8a52f1764b1dacf46e716ce6a201662bbb72d (diff)
downloadhdf5-9f514c2b7de0d07cfcb26d3e2355e070033f7a11.zip
hdf5-9f514c2b7de0d07cfcb26d3e2355e070033f7a11.tar.gz
hdf5-9f514c2b7de0d07cfcb26d3e2355e070033f7a11.tar.bz2
[svn-r18331] Description:
Update to use H5Gcreate2 instead of H5Gcreate. Remove mis-used type related code. Tested: jam, amani and linew
-rw-r--r--tools/h5copy/h5copygentest.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c
index c1e21f3..cd17295 100644
--- a/tools/h5copy/h5copygentest.c
+++ b/tools/h5copy/h5copygentest.c
@@ -410,7 +410,7 @@ static void gent_nested_group(hid_t loc_id)
*------------------------------------------------------------------------*/
static herr_t gen_obj_ref(hid_t loc_id)
{
- hid_t sid=0, tid=0, oid=0;
+ hid_t sid=0, oid=0;
hsize_t dims1[1]={3};
hsize_t dims2[1]={2};
int data[3] = {10,20,30};
@@ -427,15 +427,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
goto out;
}
- tid = H5Tcopy(H5T_NATIVE_INT);
- if (tid < 0)
- {
- fprintf(stderr, "Error: %s %d> H5Tcopy failed.\n", __FUNCTION__, __LINE__);
- ret = FAIL;
- goto out;
- }
-
- oid = H5Dcreate2 (loc_id, OBJ_REF_DS, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ oid = H5Dcreate2 (loc_id, OBJ_REF_DS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0)
{
fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __FUNCTION__, __LINE__);
@@ -443,7 +435,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
goto out;
}
- status = H5Dwrite(oid, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
+ status = H5Dwrite(oid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0)
{
fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __FUNCTION__, __LINE__);
@@ -452,15 +444,14 @@ static herr_t gen_obj_ref(hid_t loc_id)
}
H5Dclose(oid);
- H5Tclose(tid);
H5Sclose(sid);
/*--------------
* add group */
- oid = H5Gcreate (loc_id, OBJ_REF_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ oid = H5Gcreate2 (loc_id, OBJ_REF_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __FUNCTION__, __LINE__);
ret = FAIL;
goto out;
}
@@ -515,8 +506,6 @@ out:
H5Dclose(oid);
if(sid > 0)
H5Sclose(sid);
- if(tid > 0)
- H5Tclose(tid);
return ret;
}