Explorar o código

[lua] fix check for bitops

Justin Donaldson %!s(int64=6) %!d(string=hai) anos
pai
achega
229476be64
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/generators/genlua.ml

+ 6 - 0
src/generators/genlua.ml

@@ -2060,6 +2060,12 @@ let generate com =
     List.iter (transform_multireturn ctx) com.types;
     List.iter (generate_type ctx) com.types;
 
+    (* If bit ops are manually imported include the haxe wrapper for them *)
+    if has_feature ctx "use._bitop" then begin
+        print_file (Common.find_file com "lua/_lua/_hx_bit.lua");
+    end;
+
+    (* integer clamping is always required, and will use bit ops if available *)
     print_file (Common.find_file com "lua/_lua/_hx_bit_clamp.lua");
 
     (* Array is required, always patch it *)