IN: Location identifier; may be a file, group, dataset, named datatype or attribute identifier
const char *name
IN: Name of the object whose comment is to be retrieved, specified as a path relative toloc_id namecan be '.' (a dot) ifloc_idfully specifies the object for which the associated comment is to be retrieved
OUT: The comment
IN: Anticipated required size of thecommentbuffer
IN: Link access property list identifier
H5O_GET_COMMENT_BY_NAME retrieves the comment for an object in the buffercomment.
The target object is specified byloc_idandname.loc_idcan specify any object in the file.namecan be one of the following: — The name of the object relative toloc_id — An absolute name of the object, starting from/, the file’s root group — A dot (.), ifloc_idfully specifies the object
The size in bytes of the comment, including theNULLterminator, is specified inbufsize. Ifbufsizeis unknown, a preliminaryH5O_GET_COMMENT_BY_NAME call with the pointercommentset toNULLwill return the size of the commentwithouttheNULLterminator.
Ifbufsizeis set to a smaller value than described above, onlybufsizebytes of the comment, without aNULLterminator, are returned incomment.
If an object does not have a comment, the empty string is returned incomment.
lapl_idcontains a link access property list identifier. A link access propety list can come into play when traversing links to access an object.
Upon success, returns the number of characters in the comment, not including theNULLterminator, or zero (0) if the object has no comment. The value returned may be larger thanbufsize. Otherwise returns a negative value.