summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-02-13 13:21:16 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-02-13 13:21:16 (GMT)
commite15ad88d9eb2962dc77848ac156d8b540bbb308d (patch)
treef7d91397b6f600e228b9c08541c0dc8af36c4b56 /src/H5R.c
parent928d398be4143546e57c50788b429095328cb3ba (diff)
parentab045c634cac0219939b93a1d2b829e7b1f3e7a1 (diff)
downloadhdf5-e15ad88d9eb2962dc77848ac156d8b540bbb308d.zip
hdf5-e15ad88d9eb2962dc77848ac156d8b540bbb308d.tar.gz
hdf5-e15ad88d9eb2962dc77848ac156d8b540bbb308d.tar.bz2
[svn-r24701] merge from trunk to 24700.
fix return type for H5T_committed in H5Tget_create_plist.
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/H5R.c b/src/H5R.c
index d6780da..111edcd 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -930,7 +930,6 @@ H5R_get_name(H5G_loc_t *loc, hid_t lapl_id, hid_t dxpl_id, H5R_type_t ref_type,
/* Check args */
HDassert(_ref);
- HDassert(name);
/* Get the file pointer from the entry */
f = loc->oloc->file;
@@ -1005,8 +1004,10 @@ done:
object that the dataset is located within.
H5R_type_t ref_type; IN: Type of reference
void *ref; IN: Reference to query.
- char *name; OUT: Buffer to place name of object referenced
- size_t size; IN: Size of name buffer
+ char *name; OUT: Buffer to place name of object referenced. If NULL
+ then this call will return the size in bytes of name.
+ size_t size; IN: Size of name buffer (user needs to include NULL terminator
+ when passing in the size)
RETURNS
Non-negative length of the path on success, Negative on failure
@@ -1018,6 +1019,12 @@ done:
This may not be the only path to that object.
EXAMPLES
REVISION LOG
+ M. Scot Breitenfeld
+ 22 January 2014
+ Changed the behavior for the returned value of the function when name is NULL.
+ If name is NULL then size is ignored and the function returns the size
+ of the name buffer (not including the NULL terminator), it still returns
+ negative on failure.
--------------------------------------------------------------------------*/
ssize_t
H5Rget_name(hid_t id, H5R_type_t ref_type, const void *_ref, char *name,