diff options
author | Daniel Kolesa <d.kolesa@samsung.com> | 2020-05-29 17:00:28 +0200 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@samsung.com> | 2020-05-29 17:00:28 +0200 |
commit | b0203b3160f2a39c3afe549fd34a513f71532fc3 (patch) | |
tree | a1df129ac90004e59dcfe1bdda47cca4275f70a6 | |
parent | 5197200ac1d49366f205a62a09a377fdece62ff9 (diff) | |
download | efl-b0203b3160f2a39c3afe549fd34a513f71532fc3.tar.gz |
bindings/luajit/eolian: get rid of using bitops
-rw-r--r-- | src/bindings/luajit/eolian.lua | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 7bd8f96894..e9001dbc66 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -2,7 +2,6 @@ -- For use with Elua local ffi = require("ffi") -local bit = require("bit") ffi.cdef [[ void eina_stringshare_del(const char *str); @@ -1564,22 +1563,21 @@ M.expression_type = { local etype = M.expression_type M.expression_mask = { - SINT = bit.lshift(1, 0), - UINT = bit.lshift(1, 1), - FLOAT = bit.lshift(1, 2), - BOOL = bit.lshift(1, 3), - STRING = bit.lshift(1, 4), - CHAR = bit.lshift(1, 5), - NULL = bit.lshift(1, 6) + SINT = 2 ^ 0, + UINT = 2 ^ 1, + FLOAT = 2 ^ 2, + BOOL = 2 ^ 3, + STRING = 2 ^ 4, + CHAR = 2 ^ 5, + NULL = 2 ^ 6 } local emask = M.expression_mask -emask.INT = bit.bor(emask.SINT , emask.UINT ) -emask.SIGNED = bit.bor(emask.SINT , emask.FLOAT) -emask.NUMBER = bit.bor(emask.INT , emask.FLOAT) -emask.ALL = bit.bor(emask.NUMBER, emask.BOOL, - emask.STRING, emask.CHAR, emask.NULL) +emask.INT = emask.SINT + emask.UINT +emask.SIGNED = emask.SINT + emask.FLOAT +emask.NUMBER = emask.INT + emask.FLOAT +emask.ALL = emask.NUMBER + emask.BOOL + emask.STRING + emask.CHAR + emask.NULL local value_con = { [etype.INT ] = function(v) return tonumber(v.value.i ) end, |