From a0577eb23b303b2f60a9237c877bd2ca370a6cc2 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Tue, 20 Jun 2023 12:03:54 +0300 Subject: [PATCH] GDScript: Fix `_get_script_name()` function collision for SCU build --- modules/gdscript/gdscript.cpp | 28 ++++++++++++++-- modules/gdscript/gdscript.h | 9 +++--- modules/gdscript/gdscript_disassembler.cpp | 32 +++++-------------- modules/gdscript/gdscript_vm.cpp | 21 +++--------- .../typed_array_pass_basic_to_typed.out | 2 +- .../typed_array_pass_differently_to_typed.out | 2 +- 6 files changed, 46 insertions(+), 48 deletions(-) diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 7a3b9dc5975..8f870368ce8 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -1354,7 +1354,7 @@ GDScript::GDScript() : path = vformat("gdscript://%d.gd", get_instance_id()); } -void GDScript::_save_orphaned_subclasses(GDScript::ClearData *p_clear_data) { +void GDScript::_save_orphaned_subclasses(ClearData *p_clear_data) { struct ClassRefWithName { ObjectID id; String fully_qualified_name; @@ -1411,7 +1411,31 @@ void GDScript::_init_rpc_methods_properties() { } } -void GDScript::clear(GDScript::ClearData *p_clear_data) { +#ifdef DEBUG_ENABLED +String GDScript::debug_get_script_name(const Ref