summaryrefslogtreecommitdiffstats
path: root/lib/tolua++/src/bin/lua/enumerate.lua
diff options
context:
space:
mode:
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)