Inline the free function.
This commit is contained in:
@ -26,8 +26,10 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#include <ctime>
|
||||
#include <cstdlib>
|
||||
#else
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -138,7 +140,9 @@ struct message *NeoComm_get_next_message(const char *channel_name);
|
||||
*
|
||||
* @param msg The message to free from memory.
|
||||
*/
|
||||
void NeoComm_free_message(struct message *msg);
|
||||
static inline void NeoComm_free_message(struct message *msg) {
|
||||
free(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a message to a channel.
|
||||
|
Reference in New Issue
Block a user