summaryrefslogtreecommitdiffstats
path: root/src/H5Gloc.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2006-08-02 23:41:53 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2006-08-02 23:41:53 (GMT)
commit3e755623cb24eb37c19fa645d74dc46948318253 (patch)
tree66e0a3807f37d50a8d6e5f3469864c604cd837c6 /src/H5Gloc.c
parent71a4d0e9c48c4e02e5384cd3f6e38a2a530e9d22 (diff)
downloadhdf5-3e755623cb24eb37c19fa645d74dc46948318253.zip
hdf5-3e755623cb24eb37c19fa645d74dc46948318253.tar.gz
hdf5-3e755623cb24eb37c19fa645d74dc46948318253.tar.bz2
[svn-r12528] Added User-Defined links to the library.
Users can create external links using H5L_create_external(). These links point to an object in another HDF5 file. Users can alter the behavior of external links or create new kinds of links by registering callbacks using the H5L interface. Added tests, tools support, etc. Also a number of other, minor changes have been made (some restructuring of the H5L interface, for instance). Additional documentation and examples are forthcoming.
Diffstat (limited to 'src/H5Gloc.c')
-rw-r--r--src/H5Gloc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 4e22357..c022169 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -46,7 +46,8 @@ typedef struct {
/* PRIVATE PROTOTYPES */
static herr_t H5G_loc_find_cb(H5G_loc_t *grp_loc, const char *name,
- const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata);
+ const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata,
+ hbool_t *own_obj_loc/*out*/);
/*-------------------------------------------------------------------------
@@ -283,7 +284,7 @@ done:
*/
static herr_t
H5G_loc_find_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name, const H5O_link_t UNUSED *lnk,
- H5G_loc_t *obj_loc, void *_udata/*in,out*/)
+ H5G_loc_t *obj_loc, void *_udata/*in,out*/, hbool_t *own_obj_loc/*out*/)
{
H5G_loc_ud1_t *udata = (H5G_loc_ud1_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
@@ -299,6 +300,7 @@ H5G_loc_find_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name, const
* of the group location for the object, or freeing it. - QAK)
*/
H5G_loc_copy(udata->loc, obj_loc, H5_COPY_SHALLOW);
+ *own_obj_loc = TRUE;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -319,7 +321,7 @@ done:
*/
herr_t
H5G_loc_find(H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc/*out*/,
- hid_t dxpl_id)
+ hid_t lapl_id, hid_t dxpl_id)
{
H5G_loc_ud1_t udata; /* User data for traversal callback */
herr_t ret_value = SUCCEED; /* Return value */
@@ -335,7 +337,7 @@ H5G_loc_find(H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc/*out*/,
udata.loc = obj_loc;
/* Traverse group hierarchy to locate object */
- if(H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G_loc_find_cb, &udata, dxpl_id) < 0)
+ if(H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G_loc_find_cb, &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
done: