diff options
author | Lee Salzman <[email protected]> | 2024-06-26 13:08:39 -0400 |
---|---|---|
committer | Lee Salzman <[email protected]> | 2024-06-26 13:08:39 -0400 |
commit | 7083138fd401faa391c4f829a86b50fdb9c5c727 (patch) | |
tree | 71c03b3020f06e1171c37796321d76412a182228 /include | |
parent | 29260f79cf15f8ca2979c71a050e554824b21e6d (diff) | |
download | enet-7083138fd401faa391c4f829a86b50fdb9c5c727.tar.gz enet-7083138fd401faa391c4f829a86b50fdb9c5c727.zip |
fix extern "C" usage
Diffstat (limited to 'include')
-rw-r--r-- | include/enet/callbacks.h | 10 | ||||
-rw-r--r-- | include/enet/enet.h | 10 | ||||
-rw-r--r-- | include/enet/list.h | 9 |
3 files changed, 24 insertions, 5 deletions
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 <stdlib.h> #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) |