fix extern "C" usage
Some checks failed
CMake / CMake ${{ matrix.os }} ${{ matrix.build_type }} (Debug, macos-latest) (push) Has been cancelled
CMake / CMake ${{ matrix.os }} ${{ matrix.build_type }} (Debug, ubuntu-latest) (push) Has been cancelled
CMake / CMake ${{ matrix.os }} ${{ matrix.build_type }} (Debug, windows-latest) (push) Has been cancelled
CMake / CMake ${{ matrix.os }} ${{ matrix.build_type }} (Release, macos-latest) (push) Has been cancelled
CMake / CMake ${{ matrix.os }} ${{ matrix.build_type }} (Release, ubuntu-latest) (push) Has been cancelled
CMake / CMake ${{ matrix.os }} ${{ matrix.build_type }} (Release, windows-latest) (push) Has been cancelled

This commit is contained in:
Lee Salzman 2024-06-26 13:08:39 -04:00
parent 29260f79cf
commit 7083138fd4
3 changed files with 24 additions and 5 deletions

View file

@ -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__ */

View file

@ -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
@{
*/

View file

@ -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)