From ea55afb084188cb4dca285545ab84cf647b504c2 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 7 Nov 2003 12:57:58 +0000 Subject: LUA does not know about C++ ?! --- lib/lua/include/lauxlib.h | 10 +++++++--- lib/lua/include/lua.h | 9 ++++++++- lib/lua/include/lualib.h | 9 ++++++++- 3 files changed, 23 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/lua/include/lauxlib.h b/lib/lua/include/lauxlib.h index 3d3610f..da4576b 100644 --- a/lib/lua/include/lauxlib.h +++ b/lib/lua/include/lauxlib.h @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.h,v 1.1 2003-11-06 11:56:07 pixel Exp $ +** $Id: lauxlib.h,v 1.2 2003-11-07 12:57:58 pixel Exp $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -14,13 +14,14 @@ #include "lua.h" +#ifdef __cplusplus +extern "C" { +#endif #ifndef LUALIB_API #define LUALIB_API LUA_API #endif - - typedef struct luaL_reg { const char *name; lua_CFunction func; @@ -139,6 +140,9 @@ LUALIB_API int lua_dobuffer (lua_State *L, const char *buff, size_t sz, #define luaL_opt_int luaL_optint #define luaL_opt_long luaL_optlong +#ifdef __cplusplus +} +#endif #endif diff --git a/lib/lua/include/lua.h b/lib/lua/include/lua.h index 0b7ff6f..b8619b5 100644 --- a/lib/lua/include/lua.h +++ b/lib/lua/include/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.1 2003-11-06 11:56:07 pixel Exp $ +** $Id: lua.h,v 1.2 2003-11-07 12:57:58 pixel Exp $ ** Lua - An Extensible Extension Language ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil ** http://www.lua.org mailto:info@lua.org @@ -13,6 +13,9 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif #define LUA_VERSION "Lua 5.0" #define LUA_COPYRIGHT "Copyright (C) 1994-2003 Tecgraf, PUC-Rio" @@ -361,6 +364,10 @@ struct lua_Debug { int i_ci; /* active function */ }; +#ifdef __cplusplus +} +#endif + /* }====================================================================== */ diff --git a/lib/lua/include/lualib.h b/lib/lua/include/lualib.h index 42ba023..04f0e38 100644 --- a/lib/lua/include/lualib.h +++ b/lib/lua/include/lualib.h @@ -1,5 +1,5 @@ /* -** $Id: lualib.h,v 1.1 2003-11-06 11:56:07 pixel Exp $ +** $Id: lualib.h,v 1.2 2003-11-07 12:57:58 pixel Exp $ ** Lua standard libraries ** See Copyright Notice in lua.h */ @@ -10,6 +10,9 @@ #include "lua.h" +#ifdef __cplusplus +extern "C" { +#endif #ifndef LUALIB_API #define LUALIB_API LUA_API @@ -53,4 +56,8 @@ LUALIB_API int luaopen_loadlib (lua_State *L); #define lua_mathlibopen luaopen_math #define lua_dblibopen luaopen_debug +#ifdef __cplusplus +} +#endif + #endif -- cgit v1.2.3