HaxeFoundation / HaxeFoundation/haxe
HX_REGISTER_VTABLE_OFFSET in gencpp.ml should be outside if (scriptable)
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
In gencpp.ml line 6551
```
if (scriptable) then
output_cpp (" HX_SCRIPTABLE_REGISTER_CLASS(\""^class_name_text^"\"," ^ class_name ^ ");\n");
Hashtbl.iter (fun _ intf_def ->
output_cpp ("\tHX_REGISTER_VTABLE_OFFSET( " ^ class_name ^ "," ^ (join_class_path_remap intf_def.cl_path "::")^ ");\n");
) native_implemented;
output_cpp ("}\n\n");
end else if not nativeGen then begin
```
Should be
```
Hashtbl.iter (fun _ intf_def ->
output_cpp ("\tHX_REGISTER_VTABLE_OFFSET( " ^ class_name ^ "," ^ (join_class_path_remap intf_def.cl_path "::")^ ");\n");
) native_implemented;
if (scriptable) then
output_cpp (" HX_SCRIPTABLE_REGISTER_CLASS(\""^class_name_text^"\"," ^ class_name ^ ");\n");
output_cpp ("}\n\n");
end else if not nativeGen then begin
```
Contributor guide
Assessment
This issue has not been assessed yet.