Skip to content

Commit

Permalink
Update from deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Glenn Song committed Nov 7, 2023
1 parent 5153d15 commit a535986
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions C/H5G/h5ex_g_traverse.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct opdata {
* Operator function to be called by H5Literate.
*/
#if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API)
herr_t op_func(hid_t loc_id, const char *name, const H5L_info1_t *info, void *operator_data);
herr_t op_func(hid_t loc_id, const char *name, const H5L_info2_t *info, void *operator_data);
#else
herr_t op_func(hid_t loc_id, const char *name, const H5L_info_t *info, void *operator_data);
#endif
Expand All @@ -48,7 +48,7 @@ main(void)
hid_t file; /* Handle */
herr_t status;
#if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API)
H5O_info1_t infobuf;
H5O_info2_t infobuf;
#else
H5O_info_t infobuf;
#endif
Expand All @@ -72,7 +72,7 @@ main(void)
*/
printf("/ {\n");
#if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API)
status = H5Literate1(file, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func, (void *)&od);
status = H5Literate2(file, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func, (void *)&od);
#else
status = H5Literate(file, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func, (void *)&od);
#endif
Expand All @@ -99,15 +99,15 @@ main(void)
************************************************************/
#if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API)
herr_t
op_func(hid_t loc_id, const char *name, const H5L_info1_t *info, void *operator_data)
op_func(hid_t loc_id, const char *name, const H5L_info2_t *info, void *operator_data)
#else
herr_t
op_func(hid_t loc_id, const char *name, const H5L_info_t *info, void *operator_data)
#endif
{
herr_t status, return_val = 0;
#if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API)
H5O_info1_t infobuf;
H5O_info2_t infobuf;
#else
H5O_info_t infobuf;
#endif
Expand All @@ -123,7 +123,7 @@ op_func(hid_t loc_id, const char *name, const H5L_info_t *info, void *operator_d
* the Library.
*/
#if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API)
status = H5Oget_info_by_name2(loc_id, name, &infobuf, H5O_INFO_ALL, H5P_DEFAULT);
status = H5Oget_info_by_name3(loc_id, name, &infobuf, H5O_INFO_ALL, H5P_DEFAULT);
#else
status = H5Oget_info_by_name(loc_id, name, &infobuf, H5P_DEFAULT);
#endif
Expand Down Expand Up @@ -159,7 +159,7 @@ op_func(hid_t loc_id, const char *name, const H5L_info_t *info, void *operator_d
nextod.prev = od;
nextod.addr = infobuf.addr;
#if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API)
return_val = H5Literate_by_name1(loc_id, name, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func,
return_val = H5Literate_by_name2(loc_id, name, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func,
(void *)&nextod, H5P_DEFAULT);
#else
return_val = H5Literate_by_name(loc_id, name, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func,
Expand Down

0 comments on commit a535986

Please sign in to comment.