commit 2af8611be189918acee925a1881d1188cc999868 from: Andrey Saranchin via: Serge Petrenko <35663196+sergepetrenko@users.noreply.github.com> date: Tue Mar 05 11:36:23 2024 UTC test: include lua headers in extern "C" scope Lua headers don't have C++ guards which means all Lua symbols are mangled as C++ ones when the files included in a C++ source file, but then the linker fails because all Lua functions are exported with C mangling. Let's include lua headers in extern "C" scope to allow to use "lua_test_utils.h" in unit tests written in C++. NO_CHANGELOG=test NO_DOC=test commit - 60cbfbe454c179bf97ebf23b1494e871a4befe1d commit + 2af8611be189918acee925a1881d1188cc999868 blob - 1ed5dcb36c1b7e49d87bb8fc6b4887a83d6b73e5 blob + 3f3d9da8b84e7eb5429e35744cc9958ed696529b --- test/unit/lua_test_utils.h +++ test/unit/lua_test_utils.h @@ -6,14 +6,14 @@ #pragma once -#include -#include -#include - #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ +#include +#include +#include + /** * Incapsulates steps we should do to create a Lua state suitable * to initialize some built-in Lua modules.