summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2008-08-05 11:27:15 +0000
committerpixel <pixel>2008-08-05 11:27:15 +0000
commitbe063bc7a6af8d520948aaf5c9b492c82dd0d1eb (patch)
treeab8a0937238f2739b2c46fe6e27a2a46305032b8
parent09625f783913e2d57cb666760428909e5f7883a7 (diff)
Small fix for spurious C++ compilers.
-rw-r--r--lib/lua/includes/llimits.h8
-rw-r--r--lib/lua/src/luacomp.c6
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/lua/includes/llimits.h b/lib/lua/includes/llimits.h
index 9b48bcd..0ac0607 100644
--- a/lib/lua/includes/llimits.h
+++ b/lib/lua/includes/llimits.h
@@ -1,5 +1,5 @@
/*
-** $Id: llimits.h,v 1.5 2007-07-27 10:05:53 pixel Exp $
+** $Id: llimits.h,v 1.6 2008-08-05 11:27:15 pixel Exp $
** Limits, basic types, and some other `installation-dependent' definitions
** See Copyright Notice in lua.h
*/
@@ -105,8 +105,14 @@ typedef lu_int32 Instruction;
#define LUA_MINBUFFER 32
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
void do_lua_lock(lua_State *);
void do_lua_unlock(lua_State *);
+#ifdef __cplusplus
+}
+#endif
#ifndef lua_lock
#define lua_lock(L) do_lua_lock(L);
diff --git a/lib/lua/src/luacomp.c b/lib/lua/src/luacomp.c
index abb7979..371707f 100644
--- a/lib/lua/src/luacomp.c
+++ b/lib/lua/src/luacomp.c
@@ -1,5 +1,5 @@
/*
- ** $Id: luacomp.c,v 1.9 2008-08-05 09:23:09 pixel Exp $
+ ** $Id: luacomp.c,v 1.10 2008-08-05 11:27:16 pixel Exp $
** Lua compiler (saves bytecodes to files; also list bytecodes)
** Highly hacked by Nicolas "Pixel" Noble to be transformed into a
** small form-factor LUA compiler.
@@ -55,6 +55,10 @@ static Proto * combine(lua_State * L, int n) {
}
}
+#ifdef __cplusplus
+extern "C" void luacmain(lua_State * L, int stripping, lua_Chunkwriter w, void *uD, int listing);
+#endif
+
void luacmain(lua_State * L, int stripping, lua_Chunkwriter w, void *uD, int listing) {
Proto * f;