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

[Perl/perl5] af94e2: regcomp.c - correct comment

From:
Yves Orton via perl5-changes
Date:
November 10, 2022 07:53
Subject:
[Perl/perl5] af94e2: regcomp.c - correct comment
Message ID:
Perl/perl5/push/refs/heads/blead/111376-d7c0b5@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: af94e2b4109a87a2c399caa8aea8cbbcad6696f3
      https://github.com/Perl/perl5/commit/af94e2b4109a87a2c399caa8aea8cbbcad6696f3
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-10 (Thu, 10 Nov 2022)

  Changed paths:
    M regcomp.c

  Log Message:
  -----------
  regcomp.c - correct comment


  Commit: d7c0b58cf68aeb7b08eee56a9e693a161f3f9106
      https://github.com/Perl/perl5/commit/d7c0b58cf68aeb7b08eee56a9e693a161f3f9106
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-10 (Thu, 10 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.


Compare: https://github.com/Perl/perl5/compare/111376aacc6d...d7c0b58cf68a



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About