summaryrefslogtreecommitdiffstats
path: root/lib/tolua++/src/bin/lua/enumerate.lua
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-20 21:23:15 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-20 21:23:15 +0100
commita69a1ef0325c5e472f1dd736f3a14a260d747ad9 (patch)
tree74857f576acc174a9927a910a7095f33faf4a9be /lib/tolua++/src/bin/lua/enumerate.lua
parentFixed bugs in patched tolua output (diff)
downloadcuberite-a69a1ef0325c5e472f1dd736f3a14a260d747ad9.tar
cuberite-a69a1ef0325c5e472f1dd736f3a14a260d747ad9.tar.gz
cuberite-a69a1ef0325c5e472f1dd736f3a14a260d747ad9.tar.bz2
cuberite-a69a1ef0325c5e472f1dd736f3a14a260d747ad9.tar.lz
cuberite-a69a1ef0325c5e472f1dd736f3a14a260d747ad9.tar.xz
cuberite-a69a1ef0325c5e472f1dd736f3a14a260d747ad9.tar.zst
cuberite-a69a1ef0325c5e472f1dd736f3a14a260d747ad9.zip
Diffstat (limited to 'lib/tolua++/src/bin/lua/enumerate.lua')
-rw-r--r--lib/tolua++/src/bin/lua/enumerate.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tolua++/src/bin/lua/enumerate.lua b/lib/tolua++/src/bin/lua/enumerate.lua
index ef3a9574c..09b22a094 100644
--- a/lib/tolua++/src/bin/lua/enumerate.lua
+++ b/lib/tolua++/src/bin/lua/enumerate.lua
@@ -49,7 +49,7 @@ function classEnumerate:print (ident,close)
end
function emitenumprototype(type)
- output("int tolua_is" .. string.gsub(type,"::","_") .. " (lua_State* L, int lo, const char * type, int def, tolua_Error* err);")
+ output("int tolua_is" .. string.gsub(type,"::","_") .. " (lua_State* L, int lo, int def, tolua_Error* err);")
end
_global_output_enums = {}
@@ -58,7 +58,7 @@ _global_output_enums = {}
function classEnumerate:supcode ()
if _global_output_enums[self.name] == nil then
_global_output_enums[self.name] = 1
- output("int tolua_is" .. string.gsub(self.name,"::","_") .. " (lua_State* L, int lo, const char * type, int def, tolua_Error* err)")
+ output("int tolua_is" .. string.gsub(self.name,"::","_") .. " (lua_State* L, int lo, int def, tolua_Error* err)")
output("{")
output("if (!tolua_isnumber(L,lo,def,err)) return 0;")
output("lua_Number val = tolua_tonumber(L,lo,def);")
@@ -134,7 +134,7 @@ function Enumerate (n,b,varname)
e.min = min
e.max = max
if n ~= "" then
- _enums[n] = 1
+ _enums[n] = true
Typedef("int "..n)
end
return _Enumerate(e, varname)