2
0
Эх сурвалжийг харах

[lua] fix check for bitops

Justin Donaldson 6 жил өмнө
parent
commit
229476be64

+ 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 *)