diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-03-19 20:02:26 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-03-19 20:02:26 +0100 |
commit | 04adca34106a83e7ccd8d3e6107e16d79595ba6d (patch) | |
tree | ef255fd73b519b67bbdab0f21b02c779eb04fea1 /lib/tolua++/src/bin/lua | |
parent | Fixed type error in lua bindings (diff) | |
download | cuberite-04adca34106a83e7ccd8d3e6107e16d79595ba6d.tar cuberite-04adca34106a83e7ccd8d3e6107e16d79595ba6d.tar.gz cuberite-04adca34106a83e7ccd8d3e6107e16d79595ba6d.tar.bz2 cuberite-04adca34106a83e7ccd8d3e6107e16d79595ba6d.tar.lz cuberite-04adca34106a83e7ccd8d3e6107e16d79595ba6d.tar.xz cuberite-04adca34106a83e7ccd8d3e6107e16d79595ba6d.tar.zst cuberite-04adca34106a83e7ccd8d3e6107e16d79595ba6d.zip |
Diffstat (limited to 'lib/tolua++/src/bin/lua')
-rw-r--r-- | lib/tolua++/src/bin/lua/basic.lua | 6 | ||||
-rw-r--r-- | lib/tolua++/src/bin/lua/enumerate.lua | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/tolua++/src/bin/lua/basic.lua b/lib/tolua++/src/bin/lua/basic.lua index f651f1fe6..d195f6dec 100644 --- a/lib/tolua++/src/bin/lua/basic.lua +++ b/lib/tolua++/src/bin/lua/basic.lua @@ -148,6 +148,9 @@ end -- check if basic type function isbasic (type) local t = gsub(type,'const ','') + if _enum_is_functions[t] then + return nil + end local m,t = applytypedef('', t) local b = _basic[t] if b then @@ -382,6 +385,7 @@ end _push_functions = {} _is_functions = {} +_enum_is_functions = {} _to_functions = {} _base_push_functions = {} @@ -410,5 +414,5 @@ function get_to_function(t) end function get_is_function(t) - return _is_functions[t] or search_base(t, _base_is_functions) or "tolua_isusertype" + return _enum_is_functions[t] or _is_functions[t] or search_base(t, _base_is_functions) or "tolua_isusertype" end diff --git a/lib/tolua++/src/bin/lua/enumerate.lua b/lib/tolua++/src/bin/lua/enumerate.lua index a00b434aa..d5d4426cf 100644 --- a/lib/tolua++/src/bin/lua/enumerate.lua +++ b/lib/tolua++/src/bin/lua/enumerate.lua @@ -130,8 +130,8 @@ function Enumerate (n,b,varname) e.min = min e.max = max if n ~= "" then + _enum_is_functions[n] = ("tolua_is" .. n) Typedef("int "..n) - _is_functions[n] = "tolua_is" .. n end return _Enumerate(e, varname) end |