53 lines
909 B
C
53 lines
909 B
C
#include <nopoll_decl.h>
|
|
|
|
/**
|
|
* \addtogroup nopoll_decl_module
|
|
* @{
|
|
*/
|
|
|
|
/**
|
|
* @brief Calloc helper for nopoll library.
|
|
*
|
|
* @param count How many items to allocate.
|
|
* @param size Size of one item.
|
|
*
|
|
* @return A newly allocated pointer.
|
|
* @see nopoll_free
|
|
*/
|
|
noPollPtr nopoll_calloc(size_t count, size_t size)
|
|
{
|
|
return calloc (count, size);
|
|
}
|
|
|
|
/**
|
|
* @brief Realloc helper for nopoll library.
|
|
*
|
|
* @param ref the reference to reallocate.
|
|
* @param size Size of the new reference.
|
|
*
|
|
* @return A newly allocated pointer.
|
|
* @see nopoll_free
|
|
*/
|
|
noPollPtr nopoll_realloc(noPollPtr ref, size_t size)
|
|
{
|
|
return realloc (ref, size);
|
|
}
|
|
|
|
/**
|
|
* @brief Allows to deallocate memory referenced by <i>ref</i> but
|
|
* checking before that the reference is different from null.
|
|
*
|
|
* @param ref The reference to clear.
|
|
*/
|
|
void nopoll_free (noPollPtr ref)
|
|
{
|
|
free (ref);
|
|
return;
|
|
}
|
|
|
|
|
|
/**
|
|
* @}
|
|
*/
|
|
|