diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-03-18 09:56:44 +0100 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-03-19 15:57:52 +0100 |
commit | 37e9658f74f9421aaae5fe71f12eb2221f2d574a (patch) | |
tree | f55aeab48b2b4edf3267aaf1f5459d52c9b7aa36 /src/macros_and_utils.h | |
parent | 352c7bec48f166e34fa94f7481882a8b5958e15c (diff) | |
download | lanes-37e9658f74f9421aaae5fe71f12eb2221f2d574a.tar.gz lanes-37e9658f74f9421aaae5fe71f12eb2221f2d574a.tar.bz2 lanes-37e9658f74f9421aaae5fe71f12eb2221f2d574a.zip |
C++ migration: buildfixes
Essentially, buildfixes when compiling as C++, plus properly marking public API as extern "C"
Diffstat (limited to 'src/macros_and_utils.h')
-rw-r--r-- | src/macros_and_utils.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h index 05a46b5..726fe64 100644 --- a/src/macros_and_utils.h +++ b/src/macros_and_utils.h | |||
@@ -1,11 +1,13 @@ | |||
1 | /* | 1 | #pragma once |
2 | * MACROS_AND_UTILS.H | ||
3 | */ | ||
4 | #ifndef MACROS_AND_UTILS_H | ||
5 | #define MACROS_AND_UTILS_H | ||
6 | 2 | ||
3 | #ifdef __cplusplus | ||
4 | extern "C" { | ||
5 | #endif // __cplusplus | ||
7 | #include "lua.h" | 6 | #include "lua.h" |
8 | #include "lualib.h" | 7 | #include "lualib.h" |
8 | #ifdef __cplusplus | ||
9 | } | ||
10 | #endif // __cplusplus | ||
9 | 11 | ||
10 | // M$ compiler doesn't support 'inline' keyword in C files... | 12 | // M$ compiler doesn't support 'inline' keyword in C files... |
11 | #if defined( _MSC_VER) | 13 | #if defined( _MSC_VER) |
@@ -98,5 +100,3 @@ extern char const* debugspew_indent; | |||
98 | } | 100 | } |
99 | 101 | ||
100 | #define LUAG_FUNC( func_name) int LG_##func_name( lua_State* L) | 102 | #define LUAG_FUNC( func_name) int LG_##func_name( lua_State* L) |
101 | |||
102 | #endif // MACROS_AND_UTILS_H | ||