Skip to content

Commit

Permalink
Make c99, c23 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
soutaro committed Jun 7, 2024
1 parent 64a96b1 commit 2282f51
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/rbs_extension/location.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ typedef struct {

typedef unsigned int rbs_loc_entry_bitmap;

// The flexible array always allocates, but it's okay.
// This struct is not allocated when the `rbs_loc` doesn't have children.
typedef struct {
unsigned short len;
unsigned short cap;
rbs_loc_entry_bitmap required_p;
rbs_loc_entry entries[0];
rbs_loc_entry entries[1];
} rbs_loc_children;

typedef struct {
VALUE buffer;
range rg;
rbs_loc_children *children;
rbs_loc_children *children; // NULL when no children is allocated
} rbs_loc;

/**
Expand Down

0 comments on commit 2282f51

Please sign in to comment.