Skip to content
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

GDExtension: Fix method binds not saying if they are varargs #99403

Merged

Conversation

dsnopek
Copy link
Contributor

@dsnopek dsnopek commented Nov 18, 2024

Fixes godotengine/godot-cpp#1641

For whatever reason, GDExtensionMethodBind::is_vararg() was hard-coded to return false - possibly we didn't originally support varargs, added support later, and then didn't update that?

Anyway, this PR updates it to return the correct value, which will prevent GDScript from trying to do a validated call for vararg functions (which isn't supported), fixing the bug.

@dsnopek dsnopek added bug topic:gdextension cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Nov 18, 2024
@dsnopek dsnopek added this to the 4.4 milestone Nov 18, 2024
@dsnopek dsnopek requested a review from a team as a code owner November 18, 2024 19:23
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple oversight

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems trivial.

Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested this branch. Can confirm it fixes godotengine/godot-cpp#1641. Thanks!

@Repiteo Repiteo merged commit 97b3dd4 into godotengine:master Nov 19, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 19, 2024

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 4.3.1.

@akien-mga akien-mga removed the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling varargs methods without arguments causes a validated call failure
5 participants