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

[iOS] Fix initialisation/termination of multiple statically linked extensions. #1316

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Nov 22, 2023

Fixes godotengine/godot#85210, with a statically linked extensions this part is shared between all extensions and therefor can use static variables.

@bruvzg bruvzg requested a review from a team as a code owner November 22, 2023 13:05
@dsnopek dsnopek added the bug This has been identified as a bug label Nov 22, 2023
@dsnopek dsnopek added this to the 4.x milestone Nov 22, 2023
Copy link
Collaborator

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

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

Thanks! This looks good to me :-)

@abcjjy
Copy link

abcjjy commented Nov 23, 2023

Will this be in v4.2?

@abcjjy
Copy link

abcjjy commented Nov 23, 2023

The static init_callback is called for every loaded extensions. Then every extension's initializer is called multiple times.

Why not use a member variable for init_callback?

@bruvzg bruvzg marked this pull request as draft November 23, 2023 07:13
@bruvzg
Copy link
Member Author

bruvzg commented Nov 23, 2023

The static init_callback is called for every loaded extensions. Then every extension's initializer is called multiple times.

Yes, this seems to be the case. Will fix a bit later.

@bruvzg bruvzg marked this pull request as ready for review November 23, 2023 11:38
@abcjjy
Copy link

abcjjy commented Nov 24, 2023

This works.

@akien-mga akien-mga merged commit 2f16edd into godotengine:master Nov 24, 2023
12 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga modified the milestones: 4.x, 4.3, 4.2 Dec 1, 2023
@dsnopek
Copy link
Collaborator

dsnopek commented Jan 22, 2024

Cherry-picking to 4.1 in #1373

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.

Multiple GDExtensions can't be registered in iOS export
4 participants