Skip to content

Commit

Permalink
Fix Julia wrappers (#5265)
Browse files Browse the repository at this point in the history
* Bring back fix for Julia wrappers from develop

* Re-enable Julia workflows

* Update links test for fix in H5Oexists_by_name

* Disable Julia workflows again
  • Loading branch information
jhendersonHDF authored Jan 23, 2025
1 parent e0cb2ca commit 905b0f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/julia-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
cd "${{ runner.workspace }}/build"
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake -G Ninja \
-DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON \
-DHDF5_ENABLE_PARALLEL:BOOL=OFF \
-DHDF5_BUILD_CPP_LIB:BOOL=OFF \
-DLIBAEC_USE_LOCALCONTENT=OFF \
Expand Down
13 changes: 4 additions & 9 deletions src/H5Gloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,26 +581,21 @@ H5G__loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_
const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
H5G_own_loc_t *own_loc /*out*/)
{
bool *exists = (bool *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
bool *exists = (bool *)_udata; /* User data passed in */

FUNC_ENTER_PACKAGE
FUNC_ENTER_PACKAGE_NOERR

/* Check if the name in this group resolved to a valid object */
if (obj_loc == NULL)
if (lnk)
*exists = false;
else
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no object or link info?");
*exists = false;
else
*exists = true;

/* Indicate that this callback didn't take ownership of the group *
* location for the object */
*own_loc = H5G_OWN_NONE;

done:
FUNC_LEAVE_NOAPI(ret_value)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G__loc_exists_cb() */

/*-------------------------------------------------------------------------
Expand Down
20 changes: 7 additions & 13 deletions test/links.c
Original file line number Diff line number Diff line change
Expand Up @@ -17089,7 +17089,7 @@ obj_exists(hid_t fapl, bool new_format)
char filename[NAME_BUF_SIZE]; /* Buffer for file name */
hid_t fid = H5I_INVALID_HID; /* File ID */
hid_t gid = H5I_INVALID_HID; /* Group ID */
herr_t status; /* Generic return value */
htri_t status; /* Generic return value */

if (new_format)
TESTING("object exists (w/new group format)");
Expand All @@ -17104,12 +17104,9 @@ obj_exists(hid_t fapl, bool new_format)

/* Hard links */
/* Verify that H5Oexists_by_name() returns false for non-existent link in root group */
H5E_BEGIN_TRY
{
status = H5Oexists_by_name(fid, "foo", H5P_DEFAULT);
}
H5E_END_TRY
if (status >= 0)
if ((status = H5Oexists_by_name(fid, "foo", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (status != 0)
TEST_ERROR;

/* Create a group, as a destination for testing */
Expand All @@ -17123,12 +17120,9 @@ obj_exists(hid_t fapl, bool new_format)
TEST_ERROR;

/* Verify that H5Oexists_by_name() returns false for non-existent object in non-root group */
H5E_BEGIN_TRY
{
status = H5Oexists_by_name(fid, "group/foo", H5P_DEFAULT);
}
H5E_END_TRY
if (status >= 0)
if ((status = H5Oexists_by_name(fid, "group/foo", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR;
if (status != 0)
TEST_ERROR;

/* Soft links */
Expand Down

0 comments on commit 905b0f7

Please sign in to comment.