diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2010-02-24 21:11:05 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2010-02-24 21:11:05 (GMT) |
commit | c56a7d4ee29dc2ae89e76c8915bc142bd62485b1 (patch) | |
tree | 795b4ca4c5711466fcacdc342fcb86daee9bc932 /tools/h5copy/h5copygentest.c | |
parent | 7585e7520aaa57746edc775d361c9a0d2d44d5f8 (diff) | |
download | hdf5-c56a7d4ee29dc2ae89e76c8915bc142bd62485b1.zip hdf5-c56a7d4ee29dc2ae89e76c8915bc142bd62485b1.tar.gz hdf5-c56a7d4ee29dc2ae89e76c8915bc142bd62485b1.tar.bz2 |
[svn-r18332] Description:
Update to use H5Gcreate2 instead of H5Gcreate.
Remove mis-used type related code.
Tested:
jam, amani and linew
Diffstat (limited to 'tools/h5copy/h5copygentest.c')
-rw-r--r-- | tools/h5copy/h5copygentest.c | 21 |
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; } |