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

[Perl/perl5] 63977f: pp_ctl.c - don't let the current cop_file endup e...

From:
Yves Orton via perl5-changes
Date:
November 22, 2022 16:10
Subject:
[Perl/perl5] 63977f: pp_ctl.c - don't let the current cop_file endup e...
Message ID:
Perl/perl5/push/refs/heads/yves/fix_empty_cop_file_20535/590026-5a8a44@github.com
  Branch: refs/heads/yves/fix_empty_cop_file_20535
  Home:   https://github.com/Perl/perl5
  Commit: 63977f506792f3195720fbd473668689e95181a1
      https://github.com/Perl/perl5/commit/63977f506792f3195720fbd473668689e95181a1
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M MANIFEST
    M pp_ctl.c
    A t/lib/Dies.pm
    M t/op/require_errors.t

  Log Message:
  -----------
  pp_ctl.c - don't let the current cop_file end up empty in @INC hooks


  Commit: b9e28fb1948a1e6da0539ac90b6d373c53095cb3
      https://github.com/Perl/perl5/commit/b9e28fb1948a1e6da0539ac90b6d373c53095cb3
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M cop.h
    M op.c

  Log Message:
  -----------
  op.c - add support for empty RCPV strings.

Currently we have no need for an empty shared string, but there is no
reason it should not be possible. This patch reworks the internals so it
is possible to create one without triggering asserts. Currently we don't
use this, but it seems reasonable that someone might want it in the
future. Under DEBUGGING we will still assert if someone tries to create
an empty RCPV unless the flag specifies it should be allowed.

At the same time the docs for rcpv_new() have been cleaned up a bit to
be more correct and reflect what actually happens inside.

This changes things so that the len member of the RCPV structure is
always non-zero in a well formed structure by accounting for the null
we add to the end explicitly. The RCPV_LEN() macro continues to return
the old value (not including the null).


  Commit: 5a8a44406dd9f9574dccee4f2c8fa9ab2e7285fb
      https://github.com/Perl/perl5/commit/5a8a44406dd9f9574dccee4f2c8fa9ab2e7285fb
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M util.c

  Log Message:
  -----------
  util.c - clarify unusual use of rcpv_new()


Compare: https://github.com/Perl/perl5/compare/5900269b12b4...5a8a44406dd9



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