Define macros for C linkage

This commit is contained in:
2024-10-05 22:06:13 +01:00
parent ffb99a3644
commit 12f182f0cf
19 changed files with 38 additions and 40 deletions

View File

@@ -4,7 +4,7 @@
#include "aliases.h"
#ifdef __cplusplus
extern "C" {
BEGIN_C_LINKAGE
#endif // __cplusplus
/***************************************************************************/ //
@@ -49,7 +49,7 @@ void *wapp_mem_allocator_realloc_aligned(const Allocator *allocator, void *ptr,
void wapp_mem_allocator_free(const Allocator *allocator, void **ptr);
#ifdef __cplusplus
}
END_C_LINKAGE
#endif // __cplusplus
#endif // !MEM_ALLOCATOR_H

View File

@@ -6,7 +6,7 @@
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
BEGIN_C_LINKAGE
#endif // __cplusplus
typedef struct arena Arena;
@@ -53,7 +53,7 @@ void wapp_mem_arena_clear(Arena *arena);
void wapp_mem_arena_destroy(Arena **arena);
#ifdef __cplusplus
}
END_C_LINKAGE
#endif // __cplusplus
#endif // !MEM_ARENA_H

View File

@@ -7,7 +7,7 @@
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
BEGIN_C_LINKAGE
#endif // __cplusplus
/***************************************************************************/ //
@@ -51,7 +51,7 @@ void wapp_mem_arena_allocator_clear(Allocator *allocator);
void wapp_mem_arena_allocator_destroy(Allocator *allocator);
#ifdef __cplusplus
}
END_C_LINKAGE
#endif // __cplusplus
#endif // !MEM_ARENA_ALLOCATOR_H

View File

@@ -3,13 +3,13 @@
#include "mem_allocator.h"
#ifdef __cplusplus
extern "C" {
BEGIN_C_LINKAGE
#endif // __cplusplus
Allocator wapp_mem_libc_allocator(void);
#ifdef __cplusplus
}
END_C_LINKAGE
#endif // __cplusplus
#endif // !MEM_LIBC_H