6c7efc4de8
The issue at [0] was opened and I just took a stab at it. I have no prior experience with pcre and pcre2, but using [1,2] I hacked together something that seems to work. Next, Michael told me to turn that patch/hack into a PR, so here we are. The dependency in meson.build now uses version:'>=10', but this is more a random guess than actual knowledge. There was a while loop in regex_new() that dealt with an error when pcre was not compiled with UTF-8 support. This loop uses a magic constant of 32 for the error code. I just dropped this loop, because I was just writing a hack and did not intend to turn this into a PR. Also, a quick "grep 32 /usr/include/pcre.h" does not find anything useful, so... *shrug* pcre_study() was removed without replacement, so the corresponding code is also simply removed. Testing done: The test suite passes for me. YMMV. [0]: https://github.com/i3/i3/issues/4682 [1]: https://www.pcre.org/current/doc/html/pcre2api.html [2]: https://www.pcre.org/current/doc/html/pcre2demo.html Signed-off-by: Uli Schlachter <psychon@znc.in> Fixes: https://github.com/i3/i3/issues/4682