Verify that events2table.c was generated successfully

This commit is contained in:
Nobuyoshi Nakada 2023-12-28 18:07:49 +09:00
parent 051a874325
commit 7016ab873e
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
2 changed files with 4 additions and 0 deletions

View File

@ -65,6 +65,8 @@ static ripper_scanner_ids_t ripper_scanner_ids;
#include "eventids2table.c"
STATIC_ASSERT(eventids2_table_size, RIPPER_EVENTIDS2_TABLE_SIZE == sizeof(ripper_scanner_ids)/sizeof(ID));
void
ripper_init_eventids2(void)
{

View File

@ -136,6 +136,8 @@ def generate_eventids2_table(ids)
buf << %Q[ rb_hash_aset(h, intern_sym("#{id}"), INT2FIX(1));\n]
end
buf << %Q[}\n]
buf << %Q[\n]
buf << %Q[#define RIPPER_EVENTIDS2_TABLE_SIZE #{ids.size}\n]
buf
end