summaryrefslogtreecommitdiffstats
path: root/examples/h5_attribute.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/h5_attribute.c')
-rw-r--r--examples/h5_attribute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/h5_attribute.c b/examples/h5_attribute.c
index 93fda77..3ce72be 100644
--- a/examples/h5_attribute.c
+++ b/examples/h5_attribute.c
@@ -184,7 +184,7 @@ main (void)
* Attach to the scalar attribute using attribute name, then read and
* display its value.
*/
- attr = H5Aopen_name(dataset,"Integer attribute");
+ attr = H5Aopen(dataset, ".", "Integer attribute", H5P_DEFAULT, H5P_DEFAULT);
ret = H5Aread(attr, H5T_NATIVE_INT, &point_out);
printf("The value of the attribute \"Integer attribute\" is %d \n", point_out);
ret = H5Aclose(attr);
@@ -241,7 +241,7 @@ attr_info(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *opdata)
/*
* Open the attribute using its name.
*/
- attr = H5Aopen_name(loc_id, name);
+ attr = H5Aopen(loc_id, ".", name, H5P_DEFAULT, H5P_DEFAULT);
/*
* Display attribute name.