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

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

From:
Yves Orton via perl5-changes
Date:
November 22, 2022 15:33
Subject:
[Perl/perl5] a2aa45: 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/6dd2ce-590026@github.com
  Branch: refs/heads/yves/fix_empty_cop_file_20535
  Home:   https://github.com/Perl/perl5
  Commit: a2aa459fe9dc7110c6d061e021be388e26133750
      https://github.com/Perl/perl5/commit/a2aa459fe9dc7110c6d061e021be388e26133750
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M pp_ctl.c
    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: d9d49a652a4119602eecd278a42e6c0c6b680c27
      https://github.com/Perl/perl5/commit/d9d49a652a4119602eecd278a42e6c0c6b680c27
  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: 5900269b12b4c3d74ef8023ad08b9ffb4fc618f9
      https://github.com/Perl/perl5/commit/5900269b12b4c3d74ef8023ad08b9ffb4fc618f9
  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/6dd2ce1a2991...5900269b12b4



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