projects
/
apps
/
madmutt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
922414d
)
small oopsies in the cpgk2c generator.
author
Pierre Habouzit
<madcoder@debian.org>
Mon, 26 Mar 2007 22:30:51 +0000
(
00:30
+0200)
committer
Pierre Habouzit
<madcoder@debian.org>
Mon, 26 Mar 2007 22:30:51 +0000
(
00:30
+0200)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
tools/cpkg2c.mll
patch
|
blob
|
history
diff --git
a/tools/cpkg2c.mll
b/tools/cpkg2c.mll
index
b33cf84
..
8355199
100644
(file)
--- a/
tools/cpkg2c.mll
+++ b/
tools/cpkg2c.mll
@@
-524,7
+524,7
@@
int luaopen_%s(lua_State *L)
luaL_newmetatable(L, \"%s\");
mt = lua_gettop(L);
- lua_pushliteral(L, \"
%s
\");
+ lua_pushliteral(L, \"
__index
\");
lua_pushvalue(L, mt); /* upvalue 1 */
lua_pushvalue(L, methods); /* upvalue 2 */
lua_pushcclosure(L, &luaM_%s_index, 2);
@@
-541,8
+541,8
@@
int luaopen_%s(lua_State *L)
lua_setmetatable(L, methods);
- lua_pop(L,
1); /* drop mt
*/
- return 1;
/* return methods */
+ lua_pop(L,
2); /* drop mt + methods
*/
+ return 1;
}
")