-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GDScript: Fix object iterator opcodes #89639
GDScript: Fix object iterator opcodes #89639
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just need to remove the TODO
comments.
48a4a0d
to
0a4cb17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
There are some weird errors on the CI tests though, not sure what's going on. |
0a4cb17
to
461a9d8
Compare
|
461a9d8
to
2778069
Compare
To fix #74686 and #91155 I added the following: @@ -2998,11 +2998,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
VariantInternal::initialize(&vref, Variant::ARRAY);
*VariantInternal::get_array(&vref) = ref;
- Variant **args = instruction_args; // Overriding an instruction argument, but we don't need access to that anymore.
- args[0] = &vref;
+ const Variant *args[] = { &vref };
Callable::CallError ce;
- Variant has_next = obj->callp(CoreStringNames::get_singleton()->_iter_init, (const Variant **)args, 1, ce);
+ Variant has_next = obj->callp(CoreStringNames::get_singleton()->_iter_init, args, 1, ce);
#ifdef DEBUG_ENABLED
if (ref.size() != 1 || ce.error != Callable::CallError::CALL_OK) {
@@ -3332,11 +3331,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
VariantInternal::initialize(&vref, Variant::ARRAY);
*VariantInternal::get_array(&vref) = ref;
- Variant **args = instruction_args; // Overriding an instruction argument, but we don't need access to that anymore.
- args[0] = &vref;
+ const Variant *args[] = { &vref };
Callable::CallError ce;
- Variant has_next = obj->callp(CoreStringNames::get_singleton()->_iter_next, (const Variant **)args, 1, ce);
+ Variant has_next = obj->callp(CoreStringNames::get_singleton()->_iter_next, args, 1, ce);
#ifdef DEBUG_ENABLED
if (ref.size() != 1 || ce.error != Callable::CallError::CALL_OK) { |
Thanks! |
self
terminates the game application with no error message #74686.PackedDataContainer
#89290.See core methods for reference:
godot/core/variant/variant_setget.cpp
Lines 1304 to 1924 in 7abe0c6