Skip to content

Conversation

@Bromeon
Copy link
Contributor

@Bromeon Bromeon commented Jun 18, 2023

A few methods in the GDExtension header construct their destination in-place, but the parameters are not declared using the Uninitialized* pointer types.

See Godot PR: godotengine/godot#78419


Below are the relevant sections where placement new is used.

TypePtr constructors:

https://github.com/godotengine/godot/blob/116f783db73f4bf7e9e96ae54dd3d0a20337cc8a/core/variant/variant_construct.h#L45-L54

VariantPtr <-> TypePtr conversions:

https://github.com/godotengine/godot/blob/116f783db73f4bf7e9e96ae54dd3d0a20337cc8a/core/variant/variant_internal.h#L1535-L1546

…acement new

These methods construct their destination in-place, but the parameters are not declared using the `Uninitialized*Ptr` pointer types.
@Bromeon Bromeon added bug This has been identified as a bug topic:gdextension This relates to the new Godot 4 extension implementation labels Jun 18, 2023
@Bromeon Bromeon requested a review from a team as a code owner June 18, 2023 21:13
Copy link
Member

@touilleMan touilleMan left a comment

Choose a reason for hiding this comment

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

👍

@akien-mga akien-mga merged commit 82edc89 into godotengine:master Jun 19, 2023
@akien-mga
Copy link
Member

Thanks!

@Bromeon Bromeon deleted the bugfix/uninit-ptr-signature branch June 19, 2023 10:29
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 topic:gdextension This relates to the new Godot 4 extension implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants