diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-14 01:52:38 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-14 01:52:38 (GMT) |
commit | 94153c6c3d776ac172f5151155acee6b64131526 (patch) | |
tree | 456c655e4a1cb0931956b5a961d4f8e805c40578 /examples | |
parent | be12aa63a0a210da111b0d31dde44c2c665c7165 (diff) | |
download | hdf5-94153c6c3d776ac172f5151155acee6b64131526.zip hdf5-94153c6c3d776ac172f5151155acee6b64131526.tar.gz hdf5-94153c6c3d776ac172f5151155acee6b64131526.tar.bz2 |
[svn-r14148] Description:
Add H5Rget_obj_type() to the API versioning and switch internal
routines to use H5Rget_obj_type2()
Misc. other code cleanups, etc.
Tested on:
FreeBSD/32 6.2 (duty)
FreeBSD/64 6.2 (liberty)
Linux/32 2.6 (kagiso)
Linux/64 2.6 (smirom)
AIX/32 5.3 (copper)
Solaris/32 2.10 (linew)
Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/h5_reference.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/h5_reference.c b/examples/h5_reference.c index 5cd6cb1..002d753 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; + H5O_type_t obj_type; herr_t status; hobj_ref_t *wbuf; /* buffer to write to disk */ @@ -118,13 +119,14 @@ main(void) { /* * Find the type of referenced objects. */ - status = H5Rget_obj_type(did_r, H5R_OBJECT, &rbuf[0]); - if ( status == H5G_GROUP ) - printf("First dereferenced object is a group. \n"); + status = H5Rget_obj_type2(did_r, H5R_OBJECT, &rbuf[0], &obj_type); + if ( obj_type == H5O_TYPE_GROUP ) + printf("First dereferenced object is a group. \n"); + + status = H5Rget_obj_type2(did_r, H5R_OBJECT, &rbuf[1], &obj_type); + if ( obj_type == H5O_TYPE_DATASET ) + printf("Second dereferenced object is a dataset. \n"); - status = H5Rget_obj_type(did_r, H5R_OBJECT, &rbuf[1]); - if ( status == H5G_DATASET ) - printf("Second dereferenced object is a dataset. \n"); /* * Get datatype of the dataset "B" */ |