On 2019-09-27, Matthew Miller <mattdm(a)fedoraproject.org> wrote:
On Wed, Sep 25, 2019 at 05:52:31PM +0200, Adam Samalik wrote:
> == pcre -> pcre2 ==
> Moving grep (one of the last packages using pcre) to pcre2. [4]
Is this a perfectly drop-in compatible replacement from a user point of
view?
The user that executes "grep -P"? Not many changes. Usually a corner
cases that have a different performance or exhibit bug fixes.
If you meant PCRE library users, then yes, there are many changes. If
you use only a basic part of the API, then porting to PCRE2 is easy. If
you use more advanced things like JIT, callouts, or custom memory
allocators, then the changes are so big the I don't recommend writing
a C macro spaghetti code to accommodate both APIs.
-- Petr