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

[cpp] Use 'CPPIA_CALL' call convention when defining externs

Hugh 8 жил өмнө
parent
commit
a13c38d06e

+ 1 - 1
src/generators/gencpp.ml

@@ -5784,7 +5784,7 @@ let generate_class_files baseCtx super_deps constructor_deps class_def inScripta
    let generate_script_function isStatic field scriptName callName =
       match follow field.cf_type  with
       | TFun (args,return_type) ->
-         output_cpp ("\nstatic void " ^ scriptName ^ "(hx::CppiaCtx *ctx) {\n");
+         output_cpp ("\nstatic void CPPIA_CALL " ^ scriptName ^ "(hx::CppiaCtx *ctx) {\n");
          let ret = script_signature return_type false in
          if (ret<>"v") then output_cpp ("ctx->return" ^ (script_type return_type false) ^ "(");
          if class_def.cl_interface then begin