Przeglądaj źródła

Do not generate scriptable glue for callable variables. Closes https://github.com/HaxeFoundation/hxcpp/issues/573

Hugh 8 lat temu
rodzic
commit
b3b4e27ab6
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/generators/gencpp.ml

+ 1 - 1
src/generators/gencpp.ml

@@ -5846,7 +5846,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) ->
+      | TFun (args,return_type) when not (is_data_member field) ->
          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) ^ "(");