mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 02:13:36 +00:00
GDScript: Fix get_*_list() methods return incorrect info
This commit is contained in:
parent
fa3428ff25
commit
462d8f4752
15 changed files with 429 additions and 305 deletions
|
|
@ -32,14 +32,6 @@
|
|||
|
||||
#include "gdscript.h"
|
||||
|
||||
const int *GDScriptFunction::get_code() const {
|
||||
return _code_ptr;
|
||||
}
|
||||
|
||||
int GDScriptFunction::get_code_size() const {
|
||||
return _code_size;
|
||||
}
|
||||
|
||||
Variant GDScriptFunction::get_constant(int p_idx) const {
|
||||
ERR_FAIL_INDEX_V(p_idx, constants.size(), "<errconst>");
|
||||
return constants[p_idx];
|
||||
|
|
@ -50,32 +42,6 @@ StringName GDScriptFunction::get_global_name(int p_idx) const {
|
|||
return global_names[p_idx];
|
||||
}
|
||||
|
||||
int GDScriptFunction::get_default_argument_count() const {
|
||||
return _default_arg_count;
|
||||
}
|
||||
|
||||
int GDScriptFunction::get_default_argument_addr(int p_idx) const {
|
||||
ERR_FAIL_INDEX_V(p_idx, default_arguments.size(), -1);
|
||||
return default_arguments[p_idx];
|
||||
}
|
||||
|
||||
GDScriptDataType GDScriptFunction::get_return_type() const {
|
||||
return return_type;
|
||||
}
|
||||
|
||||
GDScriptDataType GDScriptFunction::get_argument_type(int p_idx) const {
|
||||
ERR_FAIL_INDEX_V(p_idx, argument_types.size(), GDScriptDataType());
|
||||
return argument_types[p_idx];
|
||||
}
|
||||
|
||||
StringName GDScriptFunction::get_name() const {
|
||||
return name;
|
||||
}
|
||||
|
||||
int GDScriptFunction::get_max_stack_size() const {
|
||||
return _stack_size;
|
||||
}
|
||||
|
||||
struct _GDFKC {
|
||||
int order = 0;
|
||||
List<int> pos;
|
||||
|
|
@ -161,9 +127,7 @@ GDScriptFunction::~GDScriptFunction() {
|
|||
return_type.script_type_ref = Ref<Script>();
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
|
||||
MutexLock lock(GDScriptLanguage::get_singleton()->mutex);
|
||||
|
||||
GDScriptLanguage::get_singleton()->function_list.remove(&function_list);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue