mirror of
https://github.com/serge1/COFFI
synced 2026-06-08 17:24:32 +00:00
1d7b4ba3a1
C4244/C4267: Instead of manually expanding macros at each call site, fix the COFFI_SET_ACCESS and COFFI_GET_SET_ACCESS macros to use narrow_cast<decltype(header.NAME)>(value) in the setter. This handles all narrowing conversions (uint64_t->uint32_t in win_header_pe, uint32_t->uint16_t in section_header, size_t->uint32_t) globally. Revert the previous manual expansions for reloc_count/line_num_count back to macro usage since the macro now handles it. C4250: Suppress the diamond virtual inheritance dominance warning with a comment explaining the design: coffi_strings and coffi_symbols both virtually inherit string_to_name_provider, and the dominant path through coffi_strings is the intended resolution. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>