diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2011-07-18 22:26:21 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2011-07-18 22:26:21 (GMT) |
commit | 4401ddb8c0ae933630516c4aba6eb219b93f5678 (patch) | |
tree | 2f382420359ad990008892d3b550f1ff17adf335 /examples/h5_reference.c | |
parent | 304f19d73093427faa319dc04926461d850032a0 (diff) | |
download | hdf5-4401ddb8c0ae933630516c4aba6eb219b93f5678.zip hdf5-4401ddb8c0ae933630516c4aba6eb219b93f5678.tar.gz hdf5-4401ddb8c0ae933630516c4aba6eb219b93f5678.tar.bz2 |
[svn-r21118] Issue 2763 - followup commit for r21117 of H5Rdereference. I forgot to update the C examples.
Tested on jam - simple change.
Diffstat (limited to 'examples/h5_reference.c')
-rw-r--r-- | examples/h5_reference.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/h5_reference.c b/examples/h5_reference.c index 31aa2cf..3820345 100644 --- a/examples/h5_reference.c +++ b/examples/h5_reference.c @@ -35,6 +35,7 @@ main(void) { hid_t gid_a; /* and dataspaces identifiers */ hid_t did_b, sid_b, tid_b; hid_t did_r, tid_r, sid_r; + hid_t dapl_id; /* Dataset access property list */ H5O_type_t obj_type; herr_t status; @@ -55,6 +56,11 @@ main(void) { */ gid_a = H5Gcreate2(fid, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + /* + * Create dataset access property list + */ + dapl_id = H5Pcreate(H5P_DATASET_ACCESS); + /* * Create dataset "B" in the file. */ @@ -128,7 +134,7 @@ main(void) { /* * Get datatype of the dataset "B" */ - did_b = H5Rdereference(did_r, H5R_OBJECT, &rbuf[1]); + did_b = H5Rdereference(did_r, dapl_id, H5R_OBJECT, &rbuf[1]); tid_b = H5Dget_type(did_b); if(H5Tequal(tid_b, H5T_NATIVE_FLOAT)) printf("Datatype of the dataset is H5T_NATIVE_FLOAT.\n"); @@ -137,6 +143,7 @@ main(void) { /* * Close all objects and free memory buffers. */ + H5Pclose(dapl_id); H5Dclose(did_r); H5Dclose(did_b); H5Tclose(tid_b); |