Rémi Bernon (@rbernon) commented about tools/widl/metadata.c:
{ static const GUID guid = { 0x9ddc04c6, 0x04ca, 0x04cc, { 0x52, 0x85, 0x4b, 0x50, 0xb2, 0x60, 0x1d, 0xa8 } }; static const USHORT space = 0x20; + UINT i;
add_string( "" ); add_userstring( NULL, 0 ); add_userstring( &space, sizeof(space) ); add_blob( NULL, 0 ); add_guid( &guid ); + + for (i = 0; i < TABLE_MAX; i++) if (tables[i].count) tables_header.valid |= (1ul << i); + + if (strings.offset >> 16) tables_header.heap_sizes |= 0x1; + if (guids.offset / sizeof(GUID) >> 16) tables_header.heap_sizes |= 0x2; + if (blobs.offset >> 16) tables_header.heap_sizes |= 0x4; Are these flags? Can we name them instead of hardcoding the bits?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8129#note_104574