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/tools.c | |
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/tools.c')
-rw-r--r-- | src/tools.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools.c b/src/tools.c index 80e0f71..6f4a06a 100644 --- a/src/tools.c +++ b/src/tools.c | |||
@@ -183,7 +183,7 @@ static void* protected_lua_Alloc( void *ud, void *ptr, size_t osize, size_t nsiz | |||
183 | static int luaG_provide_protected_allocator( lua_State* L) | 183 | static int luaG_provide_protected_allocator( lua_State* L) |
184 | { | 184 | { |
185 | Universe* U = universe_get( L); | 185 | Universe* U = universe_get( L); |
186 | AllocatorDefinition* const def = lua_newuserdatauv( L, sizeof(AllocatorDefinition), 0); | 186 | AllocatorDefinition* const def = (AllocatorDefinition*) lua_newuserdatauv( L, sizeof(AllocatorDefinition), 0); |
187 | def->allocF = protected_lua_Alloc; | 187 | def->allocF = protected_lua_Alloc; |
188 | def->allocUD = &U->protected_allocator; | 188 | def->allocUD = &U->protected_allocator; |
189 | return 1; | 189 | return 1; |