summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gdscript_byte_codegen.cpp4
-rw-r--r--modules/gdscript/gdscript_compiler.cpp6
-rw-r--r--modules/gdscript/tests/scripts/analyzer/warnings/lambda_unused_arg.gd2
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.gd11
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.out3
-rw-r--r--modules/mono/editor/bindings_generator.cpp2
-rw-r--r--modules/theora/video_stream_theora.cpp10
7 files changed, 13 insertions, 25 deletions
diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp
index 5b092e3691..d6f21d297a 100644
--- a/modules/gdscript/gdscript_byte_codegen.cpp
+++ b/modules/gdscript/gdscript_byte_codegen.cpp
@@ -1058,7 +1058,7 @@ void GDScriptByteCodeGenerator::write_call_gdscript_utility(const Address &p_tar
void GDScriptByteCodeGenerator::write_call_utility(const Address &p_target, const StringName &p_function, const Vector<Address> &p_arguments) {
bool is_validated = true;
if (Variant::is_utility_function_vararg(p_function)) {
- is_validated = true; // Vararg works fine with any argument, since they can be any type.
+ is_validated = false; // Vararg needs runtime checks, can't use validated call.
} else if (p_arguments.size() == Variant::get_utility_function_argument_count(p_function)) {
bool all_types_exact = true;
for (int i = 0; i < p_arguments.size(); i++) {
@@ -1107,7 +1107,7 @@ void GDScriptByteCodeGenerator::write_call_builtin_type(const Address &p_target,
// Check if all types are correct.
if (Variant::is_builtin_method_vararg(p_type, p_method)) {
- is_validated = true; // Vararg works fine with any argument, since they can be any type.
+ is_validated = false; // Vararg needs runtime checks, can't use validated call.
} else if (p_arguments.size() == Variant::get_builtin_method_argument_count(p_type, p_method)) {
bool all_types_exact = true;
for (int i = 0; i < p_arguments.size(); i++) {
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index 7feb19c8ed..e0f0d3ba9d 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -211,10 +211,6 @@ static bool _can_use_ptrcall(const MethodBind *p_method, const Vector<GDScriptCo
return true;
}
-inline static bool is_category_or_group(const PropertyInfo &p_info) {
- return p_info.usage & PROPERTY_USAGE_CATEGORY || p_info.usage & PROPERTY_USAGE_GROUP || p_info.usage & PROPERTY_USAGE_SUBGROUP;
-}
-
GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &codegen, Error &r_error, const GDScriptParser::ExpressionNode *p_expression, bool p_root, bool p_initializer, const GDScriptCodeGenerator::Address &p_index_addr) {
if (p_expression->is_constant && !(p_expression->get_datatype().is_meta_type && p_expression->get_datatype().kind == GDScriptParser::DataType::CLASS)) {
return codegen.add_constant(p_expression->reduced_value);
@@ -250,7 +246,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
// Try members.
if (!codegen.function_node || !codegen.function_node->is_static) {
// Try member variables.
- if (codegen.script->member_indices.has(identifier) && !is_category_or_group(codegen.script->member_info[identifier])) {
+ if (codegen.script->member_indices.has(identifier)) {
if (codegen.script->member_indices[identifier].getter != StringName() && codegen.script->member_indices[identifier].getter != codegen.function_name) {
// Perform getter.
GDScriptCodeGenerator::Address temp = codegen.add_temporary(codegen.script->member_indices[identifier].data_type);
diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/lambda_unused_arg.gd b/modules/gdscript/tests/scripts/analyzer/warnings/lambda_unused_arg.gd
index 6fc90ea29c..1e5c10b7d5 100644
--- a/modules/gdscript/tests/scripts/analyzer/warnings/lambda_unused_arg.gd
+++ b/modules/gdscript/tests/scripts/analyzer/warnings/lambda_unused_arg.gd
@@ -1,4 +1,4 @@
func test():
var lambda := func(unused: Variant) -> void:
pass
- lambda.call()
+ lambda.call("something")
diff --git a/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.gd b/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.gd
deleted file mode 100644
index a5ad7c0b85..0000000000
--- a/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.gd
+++ /dev/null
@@ -1,11 +0,0 @@
-# https://github.com/godotengine/godot/issues/73843
-extends RefCounted
-
-@export_group("Resource")
-@export_category("RefCounted")
-
-func test():
- var res = Resource.new()
- var ref = RefCounted.new()
- prints("Resource class not shadowed:", res is Resource)
- prints("RefCounted class not shadowed:", ref is RefCounted)
diff --git a/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.out b/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.out
deleted file mode 100644
index 182c6dcd3a..0000000000
--- a/modules/gdscript/tests/scripts/runtime/features/groups_are_not_properties.out
+++ /dev/null
@@ -1,3 +0,0 @@
-GDTEST_OK
-Resource class not shadowed: true
-RefCounted class not shadowed: true
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index ad6306bb41..cbe5266f7e 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -2831,7 +2831,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
TypeInterface itype = TypeInterface::create_object_type(type_cname, pascal_to_pascal_case(type_cname), api_type);
itype.base_name = ClassDB::get_parent_class(type_cname);
- itype.is_singleton = Engine::get_singleton()->has_singleton(itype.proxy_name);
+ itype.is_singleton = Engine::get_singleton()->has_singleton(type_cname);
itype.is_instantiable = class_info->creation_func && !itype.is_singleton;
itype.is_ref_counted = ClassDB::is_parent_class(type_cname, name_cache.type_RefCounted);
itype.memory_own = itype.is_ref_counted;
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index b38f7225a2..6c961813b4 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -251,8 +251,12 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) {
/* we're expecting more header packets. */
while ((theora_p && theora_p < 3) || (vorbis_p && vorbis_p < 3)) {
+ int ret = 0;
+
/* look for further theora headers */
- int ret = ogg_stream_packetout(&to, &op);
+ if (theora_p && theora_p < 3) {
+ ret = ogg_stream_packetout(&to, &op);
+ }
while (theora_p && theora_p < 3 && ret) {
if (ret < 0) {
fprintf(stderr, "Error parsing Theora stream headers; corrupt stream?\n");
@@ -269,7 +273,9 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) {
}
/* look for more vorbis header packets */
- ret = ogg_stream_packetout(&vo, &op);
+ if (vorbis_p && vorbis_p < 3) {
+ ret = ogg_stream_packetout(&vo, &op);
+ }
while (vorbis_p && vorbis_p < 3 && ret) {
if (ret < 0) {
fprintf(stderr, "Error parsing Vorbis stream headers; corrupt stream?\n");