summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-03-18 00:07:50 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-03-18 00:07:50 (GMT)
commitb0138a0cb0a7a327600ab57affb754ff1167d44b (patch)
treea1fe26467646e4f702d29577b3667292358259d1 /src/H5R.c
parente433e6c4a977a977ed460670b3fb4c7214849488 (diff)
downloadhdf5-b0138a0cb0a7a327600ab57affb754ff1167d44b.zip
hdf5-b0138a0cb0a7a327600ab57affb754ff1167d44b.tar.gz
hdf5-b0138a0cb0a7a327600ab57affb754ff1167d44b.tar.bz2
[svn-r1144] Added support for object references to groups.
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 70a624e..8662924 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -330,6 +330,7 @@ static hid_t
H5R_dereference(H5D_t *dset, H5R_type_t ref_type, void *_ref)
{
H5D_t *dataset; /* Pointer to dataset to open */
+ H5G_t *group; /* Pointer to group to open */
H5G_entry_t ent; /* Symbol table entry */
uint8_t *p; /* Pointer to OID to store */
intn oid_type; /* type of object being dereferenced */
@@ -401,6 +402,16 @@ H5R_dereference(H5D_t *dset, H5R_type_t ref_type, void *_ref)
oid_type=H5G_get_type(&ent);
switch(oid_type) {
case H5G_GROUP:
+ if ((group=H5G_open_oid(&ent)) == NULL) {
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "not found");
+ }
+
+ /* Create an atom for the dataset */
+ if ((ret_value = H5I_register(H5I_GROUP, group)) < 0) {
+ H5G_close(group);
+ HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, FAIL,
+ "can't register group");
+ }
break;
case H5G_TYPE: