H5Oget_comment(
hid_t object_id,
char *comment,
size_t bufsize,
)
H5Oget_comment retrieves the comment for the
specified object in the buffer comment.
The target object is specified by an identifier, object_id.
The size in bytes of the comment, including the NULL
terminator, is specified in bufsize.
If bufsize is unknown,
a preliminary H5Oget_comment call
with the pointer comment set to NULL
will return the size of the comment
without the NULL terminator.
If bufsize is set to a smaller value than described above,
only bufsize bytes of the comment,
without a NULL terminator, are returned in
comment.
If an object does not have a comment, the empty string
is returned in comment.
hid_t object_id |
IN: Identifier for the target object. |
char *comment |
OUT: The comment. |
size_t bufsize |
IN: Anticipated required size of the
comment buffer. |
NULL terminator,
or zero (0) if the object has no comment.
The value returned may be larger than bufsize.
Otherwise returns a negative value.
| Release | C |
| 1.8.0 | Function introduced in this release. |