Source
391
391
hobj_ref_t obj_ref;
392
392
herr_t ret;
393
393
394
394
/* Create a group with a UTF-8 name */
395
395
grp_id = H5Gcreate2(fid, string, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
396
396
CHECK(grp_id, FAIL, "H5Gcreate2");
397
397
398
398
/* Set a comment on the group to test that we can access the group
399
399
* Also test that UTF-8 comments can be read.
400
400
*/
401
-
ret = H5Oset_comment(fid, string, string, H5P_DEFAULT);
402
-
CHECK(ret, FAIL, "H5Oset_comment");
403
-
ret = H5Oget_comment(fid, string, read_buf, (size_t)MAX_STRING_LENGTH, H5P_DEFAULT);
404
-
CHECK(ret, FAIL, "H5Oget_comment");
401
+
ret = H5Oset_comment_by_name(fid, string, string, H5P_DEFAULT);
402
+
CHECK(ret, FAIL, "H5Oset_comment_by_name");
403
+
ret = H5Oget_comment_by_name(fid, string, read_buf, (size_t)MAX_STRING_LENGTH, H5P_DEFAULT);
404
+
CHECK(ret, FAIL, "H5Oget_comment_by_name");
405
405
406
406
ret = H5Gclose(grp_id);
407
407
CHECK(ret, FAIL, "H5Gclose");
408
408
409
409
VERIFY(HDstrcmp(string, read_buf), 0, "strcmp");
410
410
411
411
/* Create a new dataset with a UTF-8 name */
412
412
grp1_id = H5Gcreate2(fid, GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
413
413
CHECK(grp1_id, FAIL, "H5Gcreate2");
414
414