Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/lua-winreg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoteus <mimir@newmail.ru>2012-09-05 16:26:58 +0400
committermoteus <mimir@newmail.ru>2012-09-05 16:26:58 +0400
commit35e6c27ea6cae79624d769343ba3d6ee93252f8d (patch)
tree77d8e6eca8976519932f6daaf387bdd011fc6d3c
parent46a94cbb43975e06bdb66f47974d09d7b3b36a22 (diff)
Fix. Lua 5.2 build
Fix. lakefile copy examples.
-rw-r--r--lakefile5
-rw-r--r--src/lua_mtutil.c6
-rw-r--r--src/lua_mtutil.h6
-rw-r--r--src/luareg.h8
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:...<upvals>#*/
if(luaL_newmetatable(L, libname)){
/*STACK:...<upvals><tablemt>#*/
@@ -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:...<udata># */
lua_opentablemt(L, mtname, mtreg, 0); /*STACK:...<udata><tablemt># */
lua_setmetatable(L, -2); /*STACK:...<udata># */
@@ -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:...<upvals>#*/
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 <lualib.h>
#include <lauxlib.h>
-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 */