From 13f5fd77bbc528862f295f9e7196f3ff709d185a Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 21 Jun 2026 21:42:12 +0200 Subject: Unicode builds now expect UTF-8 strings * They are built with `-DREGEX_UTF8` instead of `-DREGEX_WCHAR`. Functions are called reg_ucomp() and reg_uexec() instead for consistency. The library is now called libhsurex.so instead of libhswrex.so. * The `chr` type is now always `unsigned char`. As a result many other uses of the `chr` type had to be changed to pchr (which is always large enough to hold a byte or wide character). Generally we try to keep code changes as small as possible since we may have to backport changes from the Tcl codebase or contribute patches to the Tcl project. --- regex.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'regex.h') diff --git a/regex.h b/regex.h index 2ef538a..1e32b18 100644 --- a/regex.h +++ b/regex.h @@ -119,13 +119,14 @@ extern "C" { # undef regerror # define regfree re_free # define regerror re_error +// FIXME # undef __REG_WIDE_T -# define __REG_WIDE_T wchar_t +# define __REG_WIDE_T unsigned char # undef __REG_WIDE_COMPILE -# define __REG_WIDE_COMPILE re_wcomp +# define __REG_WIDE_COMPILE re_ucomp # undef __REG_WIDE_EXEC -# define __REG_WIDE_EXEC re_wexec -# ifndef REGEX_WCHAR +# define __REG_WIDE_EXEC re_uexec +# ifndef REGEX_UTF8 # undef __REG_NOCHAR # endif #endif -- cgit v1.2.3