aports/main/lua5.4/extern-c-for-cpp.patch
psykose 03200ecf6c main/lua5.4: add c++ pkgconfig
debian seems to have it https://salsa.debian.org/lua-team/lua5.4/-/blob/master/debian/lua-c++.pc.in
and it seems to actually be used by some people (see !34167).

also add the extern C guard to make lua safe to import from C++
2022-05-10 08:49:11 +00:00

23 lines
514 B
Diff

Patch-Source: https://salsa.debian.org/lua-team/lua5.4/-/blob/bc284bb404e51d27feb5ffc705de8e32959c2048/debian/patches/0003-extern_C.patch
From: Enrico Tassi <gareuselesinge@debian.org>
Date: Fri, 14 Aug 2015 09:36:52 +0200
Subject: extern_C
---
src/luaconf.h | 4 ++++
1 file changed, 4 insertions(+)
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -287,7 +287,11 @@
#else /* }{ */
+#ifdef __cplusplus
+#define LUA_API extern "C"
+#else
#define LUA_API extern
+#endif
#endif /* } */