Skip to content

Commit

Permalink
renamed H5VLstart_lib_state and H5VLfinish_lib_state, updated documen…
Browse files Browse the repository at this point in the history
…tation
  • Loading branch information
brtnfld committed Nov 4, 2024
1 parent 0e9f74f commit ca5e780
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 47 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## ----------------------------------------------------------------------
## Initialize configure.
##
AC_PREREQ([2.71])
AC_PREREQ([2.69])

## AC_INIT takes the name of the package, the version number, and an
## email address to report bugs. AC_CONFIG_SRCDIR takes a unique file
Expand Down
2 changes: 2 additions & 0 deletions doxygen/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ ALIASES += op_data{1}="\param[in,out] \1 User-defined callback function context"
ALIASES += op_data_in="\param[in] op_data User-defined callback function context"
ALIASES += op_data_in{1}="\param[in] \1 User-defined callback function context"

ALIASES += vol_only_api="This routine is exclusively for authors of HDF5 VOL connectors. It is not part of the public HDF5 APIs for HDF5 application developers."

################################################################################
# Asynchronous
################################################################################
Expand Down
48 changes: 4 additions & 44 deletions src/H5VL.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,27 +768,8 @@ H5VLretrieve_lib_state(void **state /*out*/)
FUNC_LEAVE_API_NOINIT(ret_value)
} /* H5VLretrieve_lib_state() */

/*---------------------------------------------------------------------------
* Function: H5VLstart_lib_state
*
* Purpose: Opens a new internal context for the HDF5 library. The context
* returned (via the OUT parameter) must be passed to
* H5VLfinish_lib_state to conclude the library's context and
* release resources.
*
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
* _not_ part of the public API for HDF5 application developers.
*
* Note: Should probably rename this to 'H5VLopen_lib_context' or
* similar.
*
* Return: Success: Non-negative, *context set
* Failure: Negative, *context unset
*
*---------------------------------------------------------------------------
*/
herr_t
H5VLstart_lib_state(void **context)
H5VLopen_lib_context(void **context)
{
herr_t ret_value = SUCCEED; /* Return value */

Expand All @@ -805,7 +786,7 @@ H5VLstart_lib_state(void **context)

done:
FUNC_LEAVE_API_NOINIT(ret_value)
} /* H5VLstart_lib_state() */
} /* H5VLopen_lib_context() */

/*---------------------------------------------------------------------------
* Function: H5VLrestore_lib_state
Expand Down Expand Up @@ -840,29 +821,8 @@ H5VLrestore_lib_state(const void *state)
FUNC_LEAVE_API_NOINIT(ret_value)
} /* H5VLrestore_lib_state() */

/*---------------------------------------------------------------------------
* Function: H5VLfinish_lib_state
*
* Purpose: Closes the internal state of the HDF5 library, undoing the
* affects of H5VLstart_lib_state.
*
* Note: This routine is _only_ for HDF5 VOL connector authors! It is
* _not_ part of the public API for HDF5 application developers.
*
* Note: This routine must be called as a "pair" with
* H5VLstart_lib_state. It can be called before / after /
* independently of H5VLfree_lib_state.
*
* Note: Should probably rename this to 'H5VLclose_lib_context' or
* similar.
*
* Return: Success: Non-negative
* Failure: Negative
*
*---------------------------------------------------------------------------
*/
herr_t
H5VLfinish_lib_state(void *context)
H5VLclose_lib_context(void *context)
{
herr_t ret_value = SUCCEED; /* Return value */

Expand All @@ -879,7 +839,7 @@ H5VLfinish_lib_state(void *context)

done:
FUNC_LEAVE_API_NOINIT(ret_value)
} /* H5VLfinish_lib_state() */
} /* H5VLclose_lib_context() */

/*---------------------------------------------------------------------------
* Function: H5VLfree_lib_state
Expand Down
43 changes: 41 additions & 2 deletions src/H5VLconnector_passthru.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,48 @@ H5_DLL hid_t H5VLwrap_register(void *obj, H5I_type_t type);

/* Library context and state routines */
H5_DLL herr_t H5VLretrieve_lib_state(void **state);
H5_DLL herr_t H5VLstart_lib_state(void **context);
/**
* \ingroup H5VLDEV
*
* \brief Opens a new internal context for the HDF5 library.
*
* \param[out] context library's context
*
* \return Returns a non-negative value if \p *context is set; otherwise returns
* negative value if \p *context is unset.
*
* \details Opens a new internal context for the HDF5 library. The context
* returned (via the OUT parameter) must be passed to
* H5VLfinish_lib_state() to conclude the library's context and
* release resources.
*
* \note \vol_only_api
*
* \since 2.0.0
*
*/
H5_DLL herr_t H5VLopen_lib_context(void **context);
H5_DLL herr_t H5VLrestore_lib_state(const void *state);
H5_DLL herr_t H5VLfinish_lib_state(void *context);
/**
* \ingroup H5VLDEV
*
* \brief Closes the internal state of the HDF5 library.
*
* \param[in] context library's context
*
* \return \herr_t
*
* \details Closes the internal state of the HDF5 library, undoing the effects
* of H5VLstart_lib_state(). This function must be called as a \em pair
* with H5VLstart_lib_state(). It can be invoked before, after, or
* independently of H5VLfree_lib_state().
*
* \note \vol_only_api
*
* \since 2.0.0
*
*/
H5_DLL herr_t H5VLclose_lib_context(void *context);
H5_DLL herr_t H5VLfree_lib_state(void *state);

/* Pass-through callbacks */
Expand Down

0 comments on commit ca5e780

Please sign in to comment.