diff --git a/binding_generator.py b/binding_generator.py index af26d3e4b..dc6e66274 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -802,6 +802,10 @@ def generate_builtin_class_header(builtin_api, size, used_classes, fully_used_cl # We don't get alignment information from the JSON so we have to guess. # This logic should be correct for all built-in types as they exist right now. alignment = 8 if size >= 8 else 4 + if class_name == "RID": + alignment = "uint64_t" + elif is_packed_array(class_name): + alignment = "void *" result.append(f"\talignas({alignment}) uint8_t opaque[{snake_class_name}_SIZE] = {{}};") result.append("")