From 9ea06e61f20ae34974226074fc6123dbb54a07c2 Mon Sep 17 00:00:00 2001 From: Roberto I Date: Fri, 5 Sep 2025 15:36:47 -0300 Subject: Details - LUAMOD_API defined as 'extern "C"' in C++. - "ANSI C" is in fact "ISO C" (comments) - Removed option -std from makefile in testes/libs. (Easier to change to C++ for tests). --- luaconf.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'luaconf.h') diff --git a/luaconf.h b/luaconf.h index 1ac64328..96a77802 100644 --- a/luaconf.h +++ b/luaconf.h @@ -319,7 +319,13 @@ ** More often than not the libs go together with the core. */ #define LUALIB_API LUA_API + +#if defined(__cplusplus) +/* Lua uses the "C name" when calling open functions */ +#define LUAMOD_API extern "C" +#else #define LUAMOD_API LUA_API +#endif /* }================================================================== */ -- cgit v1.2.3-55-g6feb