Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for H5Literate() callback versioning #2888

Merged
merged 5 commits into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions h5_test/tst_h_files4.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,23 @@ with the H5Lvisit function call
*/
herr_t
op_func (hid_t g_id, const char *name,
#if H5_VERSION_GE(1,12,0)
const H5L_info2_t *info,
#else
const H5L_info_t *info,
#endif
void *op_data)
{
hid_t id;
H5I_type_t obj_type;

strcpy((char *)op_data, name);
#if H5_VERSION_GE(1,12,0)
if ((id = H5Oopen_by_token(g_id, info->u.token)) < 0) ERR;
#else
#if H5_VERSION_LE(1, 10, 11) || defined(H5_USE_110_API_DEFAULT) || defined(H5_USE_18_API_DEFAULT) || defined(H5_USE_16_API_DEFAULT)
/* This library is either 1.10.11 (the last 1.10 release) or earlier
* OR this is a later version of the library built with a 1.10 or
* earlier API (earlier versions did not define their own USE
* API symbol).
*/
if ((id = H5Oopen_by_addr(g_id, info->u.address)) < 0) ERR;
#else
/* HDF5 1.12 switched from addresses to tokens to better support the VOL */
if ((id = H5Oopen_by_token(g_id, info->u.token)) < 0) ERR;
#endif

/* Using H5Ovisit is really slow. Use H5Iget_type for a fast
Expand Down
Loading