Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion StructFields.pm
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,9 @@ sub get_struct_field_type($;%) {
$prefix = get_container_item_type($tag, -weak => 1, -void => 'void')."*";
} elsif ($meta eq 'static-array') {
($prefix, $suffix) = get_container_item_type($tag);
header_ref("array");
my $count = get_container_count($tag);
$suffix = "[$count]".$suffix;
$prefix = "std::array<$prefix,$count>";
} elsif ($meta eq 'primitive') {
local $_ = $tag;
my $handler = $custom_primitive_handlers{$subtype} or die "Invalid primitive: $subtype\n";
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Template for new versions:
# Future

## Structures
- changed codegen to use ``std::array`` for fixed-length arrays instead of C-style arrays

# 53.15-r1

Expand Down
2 changes: 1 addition & 1 deletion codegen.pl
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ BEGIN
emit "INIT_GLOBAL_FUNCTION_PREFIX";

for my $item (@items) {
emit "INIT_GLOBAL_FUNCTION_ITEM(", $item->[0], ', ', $item->[1], ");";
emit "INIT_GLOBAL_FUNCTION_ITEM(", $item->[1], ', ', $item->[0], ");";
}
} "void InitGlobals() ";
} "namespace global ";
Expand Down
Loading