diff --git a/include/neocomm.h b/include/neocomm.h index f2f19fd..8de742e 100644 --- a/include/neocomm.h +++ b/include/neocomm.h @@ -26,8 +26,10 @@ #ifdef __cplusplus extern "C" { #include +#include #else #include +#include #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. diff --git a/src/channel.cpp b/src/channel.cpp index 0f6ae75..df8a576 100644 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -99,10 +99,6 @@ struct message *NeoComm_get_next_message(const char *channel_name) { return msg; } -void NeoComm_free_message(struct message *msg) { - free(msg); -} - time_t NeoComm_send_message(const char *channel_name, const char *message) { if(not node.isRunning()) {