From 35e6c27ea6cae79624d769343ba3d6ee93252f8d Mon Sep 17 00:00:00 2001 From: moteus Date: Wed, 5 Sep 2012 16:26:58 +0400 Subject: Fix. Lua 5.2 build Fix. lakefile copy examples. --- lakefile | 5 ++++- src/lua_mtutil.c | 6 +++--- src/lua_mtutil.h | 6 +++--- src/luareg.h | 8 ++++---- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lakefile b/lakefile index 98c1945..c471e75 100644 --- a/lakefile +++ b/lakefile @@ -48,7 +48,10 @@ install = target('install', { file.group{odir=J(INSTALL_DIR, 'doc'); src = J('doc','*.*');recurse=true; }; - target(J(INSTALL_DIR, 'bin', winreg.target), winreg, CP ); + file.group{odir=J(INSTALL_DIR, 'examples'); + src = J('examples','*.*');recurse=true; + }; + target(J(INSTALL_DIR, 'bin', winreg.name .. DLL_EXT), winreg, CP ); }) target('test', install, function() diff --git a/src/lua_mtutil.c b/src/lua_mtutil.c index b7a927f..1e1d3a7 100644 --- a/src/lua_mtutil.c +++ b/src/lua_mtutil.c @@ -4,7 +4,7 @@ #include "l52util.h" /* push metatable to stack, create if not yet reg, the metatable of the table is its self */ -int lua_opentablemt(lua_State *L, const char * libname, const luaL_reg * reg, int upval){ +int lua_opentablemt(lua_State *L, const char * libname, const luaL_Reg * reg, int upval){ /*STACK:...#*/ if(luaL_newmetatable(L, libname)){ /*STACK:...#*/ @@ -21,7 +21,7 @@ int lua_opentablemt(lua_State *L, const char * libname, const luaL_reg * reg, in } /* new user data with metamethods table */ -void * lua_newuserdatamt(lua_State *L, size_t cdata, const char * mtname, const luaL_reg * mtreg){ +void * lua_newuserdatamt(lua_State *L, size_t cdata, const char * mtname, const luaL_Reg * mtreg){ void* pdata = lua_newuserdata(L, cdata);/*STACK:...# */ lua_opentablemt(L, mtname, mtreg, 0); /*STACK:...# */ lua_setmetatable(L, -2); /*STACK:...# */ @@ -29,7 +29,7 @@ void * lua_newuserdatamt(lua_State *L, size_t cdata, const char * mtname, const } /* new user data with metamethods table and upvalues */ -void * lua_newuserdatamtuv(lua_State *L, size_t cdata, const char * mtname, const luaL_reg * mtreg, int upval){ +void * lua_newuserdatamtuv(lua_State *L, size_t cdata, const char * mtname, const luaL_Reg * mtreg, int upval){ void* pdata; /*STACK:...#*/ lua_opentablemt(L, mtname, mtreg, upval); diff --git a/src/lua_mtutil.h b/src/lua_mtutil.h index fe7b9bc..01f56e9 100644 --- a/src/lua_mtutil.h +++ b/src/lua_mtutil.h @@ -7,9 +7,9 @@ extern "C" { #include #include -int lua_opentablemt(lua_State *L, const char * libname, const luaL_reg * reg); -void * lua_newuserdatamt(lua_State *L, size_t cdata, const char * mtname, const luaL_reg * mtreg); -void * lua_newuserdatamtuv(lua_State *L, size_t cdata, const char * mtname, const luaL_reg * mtreg, int upval); +int lua_opentablemt(lua_State *L, const char * libname, const luaL_Reg * reg); +void * lua_newuserdatamt(lua_State *L, size_t cdata, const char * mtname, const luaL_Reg * mtreg); +void * lua_newuserdatamtuv(lua_State *L, size_t cdata, const char * mtname, const luaL_Reg * mtreg, int upval); #ifdef __cplusplus } #endif diff --git a/src/luareg.h b/src/luareg.h index f80c833..26c5f05 100644 --- a/src/luareg.h +++ b/src/luareg.h @@ -28,9 +28,9 @@ int reg_getstrval(lua_State *L); int reg_getvaltype(lua_State *L); /* Total:22 */ -extern luaL_reg lreg_regobj[]; +extern luaL_Reg lreg_regobj[]; #ifdef LUA_REG_DEFINE_EXTERNS -luaL_reg lreg_regobj[] = { +luaL_Reg lreg_regobj[] = { {"__gc",reg_close}, {"close",reg_close}, {"createkey",reg_createkey}, @@ -55,9 +55,9 @@ luaL_reg lreg_regobj[] = { {0,0}};/* Total:21 */ #endif -extern luaL_reg lreg_reglib[]; +extern luaL_Reg lreg_reglib[]; #ifdef LUA_REG_DEFINE_EXTERNS -luaL_reg lreg_reglib[] = { +luaL_Reg lreg_reglib[] = { {"createkey",reglib_createkey}, {"openkey",reglib_openkey}, {0,0}};/* Total:2 */ -- cgit v1.2.3