mirror of
https://github.com/fish-shell/fish-shell
synced 2025-02-14 21:18:45 +00:00
Extend PCRE2 wchar_t interop support to 16-bit wchar_t impls
Previously, the interop glue for more friendly access to PCRE2's fixed-size values was only used when char32_t/wchar_t were interchangeable and PCRE2 was used with a global 32-bit unit width set; this patch extends the same to char16_t when wchar_t is also 16-bits (namely on Cygwin) to avoid compilation fpermissive warnings about casts between types of potentially different sizes. Reported in #6585.
This commit is contained in:
parent
9b763581cf
commit
215df7eec6
1 changed files with 8 additions and 0 deletions
|
@ -925,10 +925,18 @@ class pcre2_matcher_t : public string_matcher_t {
|
|||
#if PCRE2_CODE_UNIT_WIDTH == 8
|
||||
uint8_t match_index_msb;
|
||||
uint8_t match_index_lsb;
|
||||
#if CHAR_BIT == PCRE2_CODE_UNIT_WIDTH
|
||||
char name[];
|
||||
#else
|
||||
char8_t name[];
|
||||
#endif
|
||||
#elif PCRE2_CODE_UNIT_WIDTH == 16
|
||||
uint16_t match_index;
|
||||
#if WCHAR_T_BITS == PCRE2_CODE_UNIT_WIDTH
|
||||
wchar_t name[];
|
||||
#else
|
||||
char16_t name[];
|
||||
#endif
|
||||
#else
|
||||
uint32_t match_index;
|
||||
#if WCHAR_T_BITS == PCRE2_CODE_UNIT_WIDTH
|
||||
|
|
Loading…
Add table
Reference in a new issue