You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RID causes native structures to be misaligned #1956
@dsnopekLooks like RID is the only Variant type that is more than 4 bytes on 32-bit, isn't hard-coded in godot-cpp, and also doesn't have an explicit alignas in Godot, so this could be fixed by adding an if in the binding generator to specifically make RIDalignas(uint64_t) rather than alignas(8).
This only affects structs containing RID, so unless someone else is using godot::Glyph this is low priority.
And godot::Glyph in godot-cpp has been broken since Godot 4.4, so I think I'm the only one currently using it. godotengine/godot#124451
Edit: Packed arrays! PackedStringArray is a Vector<String>, which is struct { struct{}; CowData<String>; } which means it's 8 bytes with 4 byte alignment too.
Activity
dsnopek commentedon Mar 24, 2026
I just posted #1958 which should fix this. Please give it a try!
BenLubar commentedon Oct 13, 2026
RID(anduint64_t) on 32-bit x86 Linux is 8 bytes, aligned to 4 bytes.BenLubar commentedon Oct 14, 2026
@dsnopek
Looks like, so this could be fixed by adding anRIDis the onlyVarianttype that is more than 4 bytes on 32-bit, isn't hard-coded in godot-cpp, and also doesn't have an explicitalignasin Godotifin the binding generator to specifically makeRIDalignas(uint64_t)rather thanalignas(8).This only affects structs containing
RID, so unless someone else is usinggodot::Glyphthis is low priority.And
godot::Glyphin godot-cpp has been broken since Godot 4.4, so I think I'm the only one currently using it. godotengine/godot#124451Edit: Packed arrays!
PackedStringArrayis aVector<String>, which isstruct { struct{}; CowData<String>; }which means it's 8 bytes with 4 byte alignment too.