diff --git a/include/enet/callbacks.h b/include/enet/callbacks.h index 340a4a9..78a85d3 100644 --- a/include/enet/callbacks.h +++ b/include/enet/callbacks.h @@ -14,14 +14,24 @@ typedef struct _ENetCallbacks void (ENET_CALLBACK * no_memory) (void); } ENetCallbacks; +#ifdef __cplusplus +extern "C" +{ +#endif + /** @defgroup callbacks ENet internal callbacks @{ @ingroup private */ + extern void * enet_malloc (size_t); extern void enet_free (void *); /** @} */ +#ifdef __cplusplus +} +#endif + #endif /* __ENET_CALLBACKS_H__ */ diff --git a/include/enet/enet.h b/include/enet/enet.h index c748eb5..dfa2c70 100644 --- a/include/enet/enet.h +++ b/include/enet/enet.h @@ -5,11 +5,6 @@ #ifndef __ENET_ENET_H__ #define __ENET_ENET_H__ -#ifdef __cplusplus -extern "C" -{ -#endif - #include #ifdef _WIN32 @@ -446,6 +441,11 @@ typedef struct _ENetEvent ENetPacket * packet; /**< packet associated with the event, if appropriate */ } ENetEvent; +#ifdef __cplusplus +extern "C" +{ +#endif + /** @defgroup global ENet global functions @{ */ diff --git a/include/enet/list.h b/include/enet/list.h index d7b2600..076e886 100644 --- a/include/enet/list.h +++ b/include/enet/list.h @@ -20,6 +20,11 @@ typedef struct _ENetList ENetListNode sentinel; } ENetList; +#ifdef __cplusplus +extern "C" +{ +#endif + extern void enet_list_clear (ENetList *); extern ENetListIterator enet_list_insert (ENetListIterator, void *); @@ -28,6 +33,10 @@ extern ENetListIterator enet_list_move (ENetListIterator, void *, void *); extern size_t enet_list_size (ENetList *); +#ifdef __cplusplus +} +#endif + #define enet_list_begin(list) ((list) -> sentinel.next) #define enet_list_end(list) (& (list) -> sentinel)