diff options
| author | 0scar <qgt268@alumni.ku.dk> | 2024-02-18 09:58:48 +0000 |
|---|---|---|
| committer | 0scar <qgt268@alumni.ku.dk> | 2024-02-18 09:58:48 +0000 |
| commit | cd7f02a3dbcc20eea3f9c6043491715a417e4996 (patch) | |
| tree | cdfed735a7ac7aad0d6265d5bcd905f4e55c17c3 /src/core | |
| parent | 01d731faf563c691838c990adceff66783ee79d9 (diff) | |
Add C++ header guard
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/include/engine/core/dltools.h | 7 | ||||
| -rw-r--r-- | src/core/include/engine/core/logging.h | 7 | ||||
| -rw-r--r-- | src/core/include/engine/core/memory.h | 7 | ||||
| -rw-r--r-- | src/core/include/engine/core/platform.h | 7 | ||||
| -rw-r--r-- | src/core/include/engine/core/state.h | 7 | ||||
| -rw-r--r-- | src/core/include/engine/core/thread.h | 7 | ||||
| -rw-r--r-- | src/core/include/engine/core/types.h | 7 | ||||
| -rw-r--r-- | src/core/include/engine/engine.h | 7 |
8 files changed, 56 insertions, 0 deletions
diff --git a/src/core/include/engine/core/dltools.h b/src/core/include/engine/core/dltools.h index 5a53f49..d9c74ee 100644 --- a/src/core/include/engine/core/dltools.h +++ b/src/core/include/engine/core/dltools.h @@ -1,6 +1,10 @@ #ifndef DLTOOLS_H #define DLTOOLS_H +#ifdef __cplusplus +extern "C" { +#endif + #include <stdbool.h> /* Utility functions for handling runtime linked shared libraries */ @@ -13,4 +17,7 @@ void* dynamic_library_reload(void* shared_library, const char* library_path); void* dynamic_library_get_symbol(void* shared_library, const char* symbol); char* dynamic_library_get_error(void); +#ifdef __cplusplus +} +#endif #endif diff --git a/src/core/include/engine/core/logging.h b/src/core/include/engine/core/logging.h index 52bb446..cd55442 100644 --- a/src/core/include/engine/core/logging.h +++ b/src/core/include/engine/core/logging.h @@ -1,6 +1,10 @@ #ifndef LOGGING_H #define LOGGING_H +#ifdef __cplusplus +extern "C" { +#endif + #include <math.h> #include <stdarg.h> #include <stdio.h> @@ -46,4 +50,7 @@ void WARN(const char* fmt, ...); void ERROR(const char* fmt, ...); +#ifdef __cplusplus +} +#endif #endif diff --git a/src/core/include/engine/core/memory.h b/src/core/include/engine/core/memory.h index dbdd065..d04d58e 100644 --- a/src/core/include/engine/core/memory.h +++ b/src/core/include/engine/core/memory.h @@ -1,6 +1,10 @@ #ifndef MEMORY_H #define MEMORY_H +#ifdef __cplusplus +extern "C" { +#endif + #include <engine/core/types.h> typedef struct memory { @@ -21,4 +25,7 @@ void memory_free(memory* mem, usize size); void memory_clear(memory* mem); +#ifdef __cplusplus +} +#endif #endif diff --git a/src/core/include/engine/core/platform.h b/src/core/include/engine/core/platform.h index 76137c9..9fe22b3 100644 --- a/src/core/include/engine/core/platform.h +++ b/src/core/include/engine/core/platform.h @@ -1,6 +1,10 @@ #ifndef ENGINE_CORE_PLATFORM_H #define ENGINE_CORE_PLATFORM_H +#ifdef __cplusplus +extern "C" { +#endif + #include <engine/core/types.h> #include <engine/core/memory.h> #include <engine/ctrl/input.h> @@ -51,4 +55,7 @@ typedef struct Platform { binding_t bindings_global[NUM_GLOBAL_BINDINGS]; } Platform; +#ifdef __cplusplus +} +#endif #endif diff --git a/src/core/include/engine/core/state.h b/src/core/include/engine/core/state.h index ee4741e..a6a5e84 100644 --- a/src/core/include/engine/core/state.h +++ b/src/core/include/engine/core/state.h @@ -1,6 +1,10 @@ #ifndef STATE_H #define STATE_H +#ifdef __cplusplus +extern "C" { +#endif + #include <engine/core/memory.h> typedef enum StateType { @@ -31,4 +35,7 @@ bool state_refresh_input_ctx(void* lib, i_ctx** ctx, usize ctx_len); #endif +#ifdef __cplusplus +} +#endif #endif diff --git a/src/core/include/engine/core/thread.h b/src/core/include/engine/core/thread.h index ee61893..3d2e6b9 100644 --- a/src/core/include/engine/core/thread.h +++ b/src/core/include/engine/core/thread.h @@ -1,6 +1,10 @@ #ifndef THREAD_H #define THREAD_H +#ifdef __cplusplus +extern "C" { +#endif + #include <engine/core/types.h> typedef u64 thread_t; @@ -9,4 +13,7 @@ typedef void*(thread_fn(void*)); thread_t thread_spawn(thread_fn* routine, void* arg); void thread_join(thread_t thread); +#ifdef __cplusplus +} +#endif #endif diff --git a/src/core/include/engine/core/types.h b/src/core/include/engine/core/types.h index 934cb63..a7d794d 100644 --- a/src/core/include/engine/core/types.h +++ b/src/core/include/engine/core/types.h @@ -1,6 +1,10 @@ #ifndef ENGINE_TYPES_H #define ENGINE_TYPES_H +#ifdef __cplusplus +extern "C" { +#endif + #include <stdbool.h> #include <stdint.h> @@ -31,4 +35,7 @@ typedef i32 isize; typedef bool(predicate_t)(const void*); +#ifdef __cplusplus +} +#endif #endif diff --git a/src/core/include/engine/engine.h b/src/core/include/engine/engine.h index 75f6313..9036520 100644 --- a/src/core/include/engine/engine.h +++ b/src/core/include/engine/engine.h @@ -1,6 +1,10 @@ #ifndef ENGINE_ENGINE_H #define ENGINE_ENGINE_H +#ifdef __cplusplus +extern "C" { +#endif + #include <stdbool.h> /* TODO: Cleanup the includes, ideally this header file should only include all @@ -48,4 +52,7 @@ v2_i32* get_mousepos(void); /* move this */ void delay(uint32_t ms); +#ifdef __cplusplus +} +#endif #endif |
