Miscellaneous group

This commit is contained in:
Marcus Weseloh 2020-11-11 22:40:20 +01:00
parent 4a40695541
commit 7f1ac22869
2 changed files with 16 additions and 7 deletions

View file

@ -28,15 +28,15 @@ extern "C" {
/**
* @defgroup Misc Miscellaneous
* @brief Miscellaneous utility functions and defines
* @defgroup misc Miscellaneous
*
* Miscellaneous utility functions and defines
*
* @{
*/
/**
* Value that indicates success, used by most libfluidsynth functions.
* @since 1.1.0
*
* @note This was not publicly defined prior to libfluidsynth 1.1.0. When
* writing code which should also be compatible with older versions, something
@ -50,14 +50,17 @@ extern "C" {
* #define FLUID_FAILED (-1)
* #endif
* @endcode
*
* @since 1.1.0
*/
#define FLUID_OK (0)
/**
* Value that indicates failure, used by most libfluidsynth functions.
* @since 1.1.0
*
* @note See #FLUID_OK for more details.
*
* @since 1.1.0
*/
#define FLUID_FAILED (-1)
@ -65,7 +68,6 @@ extern "C" {
FLUIDSYNTH_API int fluid_is_soundfont(const char *filename);
FLUIDSYNTH_API int fluid_is_midifile(const char *filename);
FLUIDSYNTH_API void fluid_free(void* ptr);
/* @} */
#ifdef __cplusplus

View file

@ -219,8 +219,15 @@ void* fluid_alloc(size_t len)
/**
* Convenience wrapper for free() that satisfies at least C90 requirements.
* Especially useful when using fluidsynth with programming languages that do not provide malloc() and free().
* @note Only use this function when the API documentation explicitly says so. Otherwise use adequate \c delete_fluid_* functions.
*
* @param ptr Pointer to memory region that should be freed
*
* Especially useful when using fluidsynth with programming languages that do not
* provide malloc() and free().
*
* @note Only use this function when the API documentation explicitly says so. Otherwise use
* adequate \c delete_fluid_* functions.
*
* @since 2.0.7
*/
void fluid_free(void* ptr)