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

Ensure that PtrToArg specializations for native structs are used #1214

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Aug 15, 2023

Fixes #1207

This changes binding_generator.py, so that rather than forward declaring native structures (which will have their own specialization for PtrToArg<>), it will always make sure to include the header.

It also adds a static_assert() to the PtrToArg<> specialization for Object's in order to ensure that it isn't ever used with a type that doesn't descend from Object. Using the MRP from #1207, if I comment out the fix in binding_generator.py then it will correctly fail to compile.

@dsnopek dsnopek added bug This has been identified as a bug cherrypick:4.1 labels Aug 15, 2023
@dsnopek dsnopek added this to the 4.x milestone Aug 15, 2023
@dsnopek dsnopek requested a review from a team as a code owner August 15, 2023 22:56
Copy link
Contributor

@paddy-exe paddy-exe left a comment

Choose a reason for hiding this comment

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

Discussed at GExtension Meeting.
Looks good to me 👍🏻

@dsnopek dsnopek merged commit 5cdc2fc into godotengine:master Sep 8, 2023
11 checks passed
@akien-mga akien-mga modified the milestones: 4.x, 4.2 Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This has been identified as a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Godot editor crash caused by custom AudioStream in GDExtension
3 participants