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:09:46 +0400
committermoteus <mimir@newmail.ru>2012-09-05 16:09:46 +0400
commit46a94cbb43975e06bdb66f47974d09d7b3b36a22 (patch)
treeee7e36b7ec56d3f7de6367122d7b7f6ec72eb13f /src/lua_mtutil.c
parente52ac7f6beaf32bdebb7e3af33448e79df5cc6b6 (diff)
Support Lua 5.2
Add tests from http://scite-ru.googlecode.com/ Add lakefile
Diffstat (limited to 'src/lua_mtutil.c')
-rw-r--r--src/lua_mtutil.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lua_mtutil.c b/src/lua_mtutil.c
index 5f6bea2..b7a927f 100644
--- a/src/lua_mtutil.c
+++ b/src/lua_mtutil.c
@@ -1,12 +1,14 @@
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
+#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){
/*STACK:...<upvals>#*/
if(luaL_newmetatable(L, libname)){
/*STACK:...<upvals><tablemt>#*/
- luaL_openlib(L, NULL, reg, upval);
+ luaL_setfuncs(L, reg, upval);
lua_pushliteral(L, "__index");
/*STACK:...<tablemt><"__index">#*/
lua_pushvalue(L, -2);