Skip to content

Commit ee1b31a

Browse files
author
q66
committed
don't rely on lua.hpp
1 parent f95de70 commit ee1b31a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ endif
101101

102102
luaver_maj = '5'
103103
luaver_num = cxx.compute_int(
104-
'LUA_VERSION_NUM', prefix: '#include <lua.hpp>',
104+
'LUA_VERSION_NUM', prefix: '#include <lua.h>',
105105
dependencies: lua_dep, include_directories: extra_inc
106106
)
107107
luaver_min = luaver_num - 500

src/lua.hh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
#define LUA_BUILD_AS_DLL
2121
#endif
2222

23-
#include <lua.hpp>
23+
extern "C" {
24+
#include <lua.h>
25+
#include <lauxlib.h>
26+
}
2427

2528
#if defined(FFI_DIAGNOSTIC_PRAGMA_CLANG)
2629
#pragma clang diagnostic pop

0 commit comments

Comments
 (0)