Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: a3330ee92109b23131410fe7d6fb803dd6079e76
      
https://github.com/Perl/perl5/commit/a3330ee92109b23131410fe7d6fb803dd6079e76
  Author: Karl Williamson <[email protected]>
  Date:   2026-01-30 (Fri, 30 Jan 2026)

  Changed paths:
    M embed.fnc
    M proto.h
    M regexec.c

  Log Message:
  -----------
  embed.fnc: Add string arg assertions for regexec

The two related functions pregexec() and regexec_flags() take arguments
that point to the beginning and end of a string.  The comments in each
function claimed that the end pointer pointed to a terminating NUL.
This isn't true.  The final byte isn't looked at, hence need not be NUL
(and there exist tests in our suite to be sure it works when not NUL).
When the end pointer points to the same position as the start pointer,
the string is considered empty, and is properly handled as such.

The embed.fnc entry for pregexec already was correct; only the comments
in regexec.c are changed.

This changes the entry for regexec_flags in embed.fnc and updates its
comments.



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to