[Perl/perl5] 223309: Create a new version of MAGIC; called Magic v2

[email protected] (Paul Evans via perl5-changes) Tue, 28 Jul 2026 04:01:10 -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: 223309691bdcc1f135370aaa2c1ead57b010a01d
      https://github.com/Perl/perl5/commit/223309691bdcc1f135370aaa2c1ead57b010a01d
  Author: Paul "LeoNerd" Evans <[email protected]>
  Date:   2026-07-27 (Mon, 27 Jul 2026)

  Changed paths:
    M MANIFEST
    M dump.c
    M embed.fnc
    M embed.h
    M ext/XS-APItest/APItest.pm
    M ext/XS-APItest/APItest.xs
    A ext/XS-APItest/APItest_magicv2.inc
    A ext/XS-APItest/APItest_magicv2.xs
    A ext/XS-APItest/t/magicv2-threads.t
    A ext/XS-APItest/t/magicv2.t
    M mg.c
    M mg.h
    M pod/perldiag.pod
    M pod/perlguts.pod
    M proto.h
    M regen/embed.pl
    M sv.c

  Log Message:
  -----------
  Create a new version of MAGIC; called Magic v2

The existing `MAGIC` and `MGVTBL` structures are insufficiently
extensible, because they lack any embedded type information, or any
version numbering by which new abilities can be added in a
backwards-compatible way. Commit 6d97c8623f managed to free a single bit
in the `mg_flags` field; it is this bit that we use to indicate that the
`MAGIC` structure refers to version 2 of Magic.

The new structures are defined in a way that should be much easier to
permit updates in future; primarily by the presence of a version number
in the `ver` field, and the set of trigger functions in the `shape`
field. In this way, we hope to be able to extend the abilities of magic
in the future by adding new structure shapes as well as new trigger
functions.


  Commit: 0705c1a09af3148e03fbb04cde6312dddc788afa
      https://github.com/Perl/perl5/commit/0705c1a09af3148e03fbb04cde6312dddc788afa
  Author: Paul "LeoNerd" Evans <[email protected]>
  Date:   2026-07-27 (Mon, 27 Jul 2026)

  Changed paths:
    M pod/perldelta.pod

  Log Message:
  -----------
  perldelta for Magic v2


Compare: https://github.com/Perl/perl5/compare/982c43260ab0...0705c1a09af3

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