develooper Front page | perl.perl5.changes | Postings from November 2022

[Perl/perl5] d32ea1: regcomp.c - add a PARNO() macro to wrap theARG() ...

Yves Orton via perl5-changes
November 9, 2022 15:10
[Perl/perl5] d32ea1: regcomp.c - add a PARNO() macro to wrap theARG() ...
Message ID:
  Branch: refs/heads/yves/parno_macro
  Commit: d32ea1be2cef413816531dd9b3b9681bd2fb9a88
  Author: Yves Orton <>
  Date:   2022-11-09 (Wed, 09 Nov 2022)

  Changed paths:
    M regcomp.c
    M regcomp.h
    M regexec.c

  Log Message:
  regcomp.c - add a PARNO() macro to wrap the ARG() macro

We used the ARG() macro to access the parno data for the OPEN
and CLOSE regops. This made it difficult to find what needed to
change when the type and size or location of this data in the
node was modified. Replacing this access with a specific macro
makes the code more legible and future proof.

This was actually backported from finding everything that broke
by changing the regnode type for OPEN and CLOSE to 2L and moving
the paren parameter to the 2L slot. We might do something like this
in the future and separating the PARNO() macros from their
implementation will make it easier. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About