Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 3f11a2855248134af98ca8d71cf71a3fe736dbae
      
https://github.com/Perl/perl5/commit/3f11a2855248134af98ca8d71cf71a3fe736dbae
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
    M mg.c
    M pp.c
    M pp_ctl.c
    M pp_hot.c
    M regcomp.c
    M regcomp_debug.c
    M regexec.c
    M regexp.h

  Log Message:
  -----------
  regexec engine - wrap and replace RX_OFFS() with better abstractions

RX_OFFS() exposes a bit too much about how capture buffers are represented.
This adds RX_OFFS_START() and RX_OFFS_END() and RX_OFFS_VALID() to replace
most of the uses of the RX_OFFS() macro or direct access to the rx->off[]
array. (We add RX_OFFSp() for those rare cases that should have direct
access to the array.) This allows us to replace this logic with more
complicated macros in the future. Pretty much anything using RX_OFFS() is
going to be broken by future changes, so changing the define allows us to
track it down easily.

Not all use of the rx->offs[] array are converted; some uses are required
for the regex engine internals, but anything outside of the regex engine
should be using the replacement macros, and most things in the regex internals
should use it also.


Reply via email to