summaryrefslogtreecommitdiffstats
path: root/examples/h5_ref2reg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-07-18 22:33:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-07-18 22:33:18 (GMT)
commit69d7f7312a6664d1f0ce4d617f08fee7f0154442 (patch)
tree92828d3cc85d58512d9b340d5e386df49eb894a3 /examples/h5_ref2reg.c
parent4401ddb8c0ae933630516c4aba6eb219b93f5678 (diff)
downloadhdf5-69d7f7312a6664d1f0ce4d617f08fee7f0154442.zip
hdf5-69d7f7312a6664d1f0ce4d617f08fee7f0154442.tar.gz
hdf5-69d7f7312a6664d1f0ce4d617f08fee7f0154442.tar.bz2
[svn-r21119] Description:
Simplify use of property lists to H5Rdereference, and switch to use H5Rdereference2. Tested on: Mac OS X/32 10.6.8 (amazon) (too small to require h5committest)
Diffstat (limited to 'examples/h5_ref2reg.c')
-rw-r--r--examples/h5_ref2reg.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/examples/h5_ref2reg.c b/examples/h5_ref2reg.c
index 4db7671..c4e8d3d 100644
--- a/examples/h5_ref2reg.c
+++ b/examples/h5_ref2reg.c
@@ -39,7 +39,6 @@ int main(void)
hid_t spacer_id;
hid_t dsetv_id; /*dataset identifiers*/
hid_t dsetr_id;
- hid_t dapl_id; /* Dataset access property list */
hsize_t dims[2] = {2,9};
hsize_t dimsr[1] = {2};
int rank = 2;
@@ -68,9 +67,6 @@ int main(void)
space_id = H5Screate_simple(rank, dims, NULL);
spacer_id = H5Screate_simple(rankr, dimsr, NULL);
- /* Create dataset access property list */
- dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
-
/*
* Create integer dataset.
*/
@@ -134,7 +130,7 @@ int main(void)
/*
* Dereference the first reference.
*/
- dsetv_id = H5Rdereference(dsetr_id, dapl_id, H5R_DATASET_REGION, &ref_out[0]);
+ dsetv_id = H5Rdereference2(dsetr_id, H5P_DEFAULT, H5R_DATASET_REGION, &ref_out[0]);
/*
* Get name of the dataset the first region reference points to
* using H5Rget_name
@@ -181,7 +177,7 @@ int main(void)
/*
* Dereference the second reference.
*/
- dsetv_id = H5Rdereference(dsetr_id, dapl_id, H5R_DATASET_REGION, &ref_out[1]);
+ dsetv_id = H5Rdereference2(dsetr_id, H5P_DEFAULT, H5R_DATASET_REGION, &ref_out[1]);
space_id = H5Rget_region(dsetv_id, H5R_DATASET_REGION,&ref_out[1]);
/*
@@ -203,7 +199,6 @@ int main(void)
* Close dataspace and the dataset.
*/
status = H5Sclose(space_id);
- status = H5Pclose(dapl_id);
status = H5Dclose(dsetv_id);
status = H5Dclose(dsetr_id);
status = H5Fclose(file_id);