[Perl/perl5] afb3a3: Permit SVf_READONLY and SVf_PROTECT flags to newSV...

[email protected] (Paul Evans via perl5-changes) Tue, 04 Aug 2026 04:27:59 -0700
Newsgroups perl.perl5.changes
Message-ID <Perl/perl5/push/refs/heads/blead/[email protected]>
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: afb3a3a27a1ba64c342dc58b1dbb1282698d3e9b
      https://github.com/Perl/perl5/commit/afb3a3a27a1ba64c342dc58b1dbb1282698d3e9b
  Author: Paul "LeoNerd" Evans <[email protected]>
  Date:   2026-08-04 (Tue, 04 Aug 2026)

  Changed paths:
    M sv.c

  Log Message:
  -----------
  Permit SVf_READONLY and SVf_PROTECT flags to newSVpvn_flags()

This allows creating new readonly string SVs in one convenient step,
without requiring a temporary and a call to `SvREADONLY_on()`.


  Commit: 45a0824b0034f1842f4d316315c46a4526ee84e9
      https://github.com/Perl/perl5/commit/45a0824b0034f1842f4d316315c46a4526ee84e9
  Author: Paul "LeoNerd" Evans <[email protected]>
  Date:   2026-08-04 (Tue, 04 Aug 2026)

  Changed paths:
    M pad.h

  Log Message:
  -----------
  Have PadnameSV() return a readonly mortalised SV

Don't permit callers to attempt to modify the returned SV. This will
allow us to cache it, or return a real stored SV if a future update
makes (at least some) padnames backed by real SVs.


  Commit: 4591663bc0611e3554b9ff4254278633fcbfa999
      https://github.com/Perl/perl5/commit/4591663bc0611e3554b9ff4254278633fcbfa999
  Author: Paul "LeoNerd" Evans <[email protected]>
  Date:   2026-08-04 (Tue, 04 Aug 2026)

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

  Log Message:
  -----------
  Remove the 'T' flag from the newPADNAME() API functions

Largely for consistency with basically everything else, and because
shortly we're going to need it in at least a few situations.


  Commit: 285ff89cd2f012e6e92c9cb177da10cef9298a32
      https://github.com/Perl/perl5/commit/285ff89cd2f012e6e92c9cb177da10cef9298a32
  Author: Paul "LeoNerd" Evans <[email protected]>
  Date:   2026-08-04 (Tue, 04 Aug 2026)

  Changed paths:
    M pad.c
    M pad.h
    M sv.c

  Log Message:
  -----------
  Prevent PadnamePV+PadnameLEN as lvalues; provide core-only _set macros

We shortly will be adjusting these macros in ways that definitely won't
be safe to use as lvalues, so for now lets ensure core will cope with
that; and at the same time discourage any non-core users from attempting
to modify these values.


  Commit: aca7b5cadb252ed5eb4a57fe2a8980ce24725651
      https://github.com/Perl/perl5/commit/aca7b5cadb252ed5eb4a57fe2a8980ce24725651
  Author: Paul "LeoNerd" Evans <[email protected]>
  Date:   2026-08-04 (Tue, 04 Aug 2026)

  Changed paths:
    M embed.fnc
    M embed.h
    M pad.c
    M pad.h
    M pod/perldelta.pod
    M proto.h
    M regen/embed.pl

  Log Message:
  -----------
  Create concept of SV-backed PADNAMEs

Currently entirely untested. Could do with some actual use, especially
during thread cloning, outer captures, and eventual reclaim afterwards.


Compare: https://github.com/Perl/perl5/compare/0f8a69b10348...aca7b5cadb25

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