浏览代码

Lua: add _G namespace for bit operations

Justin Donaldson 10 年之前
父节点
当前提交
4e8cdd3be2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      genlua.ml

+ 1 - 1
genlua.ml

@@ -1053,7 +1053,7 @@ and gen_tbinop ctx op e1 e2 =
     );
 
 and gen_bitop ctx op e1 e2 =
-    print ctx "bit.%s(" (match op with
+    print ctx "_G.bit.%s(" (match op with
         | Ast.OpXor  ->  "bxor"
         | Ast.OpAnd  ->  "band"
         | Ast.OpShl  ->  "lshift"