Skip to content

Cherry-picks for the godot-cpp 4.3 branch - 1st batch#1569

Merged
dsnopek merged 7 commits intogodotengine:4.3from
dsnopek:4.3-cherrypicks-1
Sep 11, 2024
Merged

Cherry-picks for the godot-cpp 4.3 branch - 1st batch#1569
dsnopek merged 7 commits intogodotengine:4.3from
dsnopek:4.3-cherrypicks-1

Conversation

@dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Sep 3, 2024

The 1st batch of PR's marked with cherrypick:4.3

raulsntos and others added 7 commits September 3, 2024 16:34
The engine uses the names `int` and `float` to refer to the 64-bit types, so in the bindings generator we have a hardcoded conversion for those types.

But this type conversion should not be used for metadata. Even though the underlying type should still be 64-bit for interop, metadata is meant to specify the correct type to expose. So if metadata says `float` it means the type is really meant to be a 32-bit `float` and not `double`. Other hardcoded type conversions (`int` and `Nil`) won't ever be metadata.

This change corrects the `float` type, to use the right type in the generated C++ code. Before we were always using `double` due to this type conversion.

(cherry picked from commit 4829199)
Was using CPPFLAGS, but should use the explicit scons CCFLAGS which
makes it clear they are applied to both the C and C++ compiler.

CPPFLAGS was also fine (they are preprocessor flags, also applied to
both C and C++), but we should try to stay consistent with what we do
in Godot.

(cherry picked from commit f36acd8)
As was fixed with godotengine/godot#91208

(cherry picked from commit 7b31f39)
@dsnopek dsnopek merged commit e298f43 into godotengine:4.3 Sep 11, 2024
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 enhancement This is an enhancement on the current functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants