Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 509e33b8716f2eef4f4b4d8334de4317531c0bdf
      
https://github.com/Perl/perl5/commit/509e33b8716f2eef4f4b4d8334de4317531c0bdf
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M mathoms.c

  Log Message:
  -----------
  mathoms.c: Add a few coments


  Commit: 9d8dbcc0beda9176883aa1bd6b751def7f7d17e3
      
https://github.com/Perl/perl5/commit/9d8dbcc0beda9176883aa1bd6b751def7f7d17e3
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M proto.h
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Don't create prototype for private macros

Prior to this commit, a commented-out prototype was created for all
macros that we have argument and return type information for.  This
might be useful information for a reader of proto.h.

This commits stops doing this for private macros.  It makes a future
commit slightly easier, and I'm unsure of the usefulness of this anyway.
But I could be persuaded otherwise.


  Commit: eac6222943a92d0fe32cd359bc6eb12cba140784
      
https://github.com/Perl/perl5/commit/eac6222943a92d0fe32cd359bc6eb12cba140784
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M proto.h
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Don't create prototype for weird macros

Where 'weird' is defined as meaning something where the normal rules
don't apply, so something we generate is unlikely to be correct.

This only affects one element, and it uses aTHX in a way that is
incompatible with it being automated.


  Commit: 2444829c88e91c6e4d1f5b1283233a026dea347e
      
https://github.com/Perl/perl5/commit/2444829c88e91c6e4d1f5b1283233a026dea347e
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M embed.fnc
    M proto.h
    M regen/embed.pl

  Log Message:
  -----------
  embed.pl: enum and union are like struct in parameters

These keywords all need another word to indicate the parameter type.
Previously only 'struct' was considered to have.

This changed showed an error in one entry embed.fnc, which is also
corrected in this commit.


  Commit: 32aaa22eec0a2a4e403b010518b39801679776d4
      
https://github.com/Perl/perl5/commit/32aaa22eec0a2a4e403b010518b39801679776d4
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M embed.fnc
    M embed.h

  Log Message:
  -----------
  embed.fnc: Drop Perl_ on do_aexec my_stat my_lstat

These macros are not for external use, so don't need a Perl_ prefix


  Commit: 838b774823624d57f1b2a1369aa0d423e440eb57
      
https://github.com/Perl/perl5/commit/838b774823624d57f1b2a1369aa0d423e440eb57
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M embed.fnc
    M embed.h
    M hv.h
    M proto.h

  Log Message:
  -----------
  Move hv_stores() declaration from embed.fnc to hv.h

This is required for the next few commits that start automatically
creating long Perl_name functions for the elements in embed.fnc that are
macros and don't already have them in the source.

Only macros can take a parameter that has to be a literal string, so
don't fit with the next few commits.  This is the only case in embed.fnc
like that, so I'm deferring dealing with it for now.


  Commit: 3abbf2e1b897a9339dffed87699a0752ef9b629d
      
https://github.com/Perl/perl5/commit/3abbf2e1b897a9339dffed87699a0752ef9b629d
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M embed.fnc

  Log Message:
  -----------
  embed.fnc: free_c_backtrace is only Perl_free_c_backtrace


  Commit: 9df1c067a997d2510c7e898ff968d2c55f939caa
      
https://github.com/Perl/perl5/commit/9df1c067a997d2510c7e898ff968d2c55f939caa
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M embed.fnc
    M proto.h

  Log Message:
  -----------
  Remove const char * const return value

A function can't return something of that type, but this has always been
a macro, so this hasn't been caught.


  Commit: 1c0e0dceeb1cc405db3e1d50925e413c27771ac3
      
https://github.com/Perl/perl5/commit/1c0e0dceeb1cc405db3e1d50925e413c27771ac3
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M embed.fnc
    M handy.h
    M proto.h

  Log Message:
  -----------
  Three macros are used in perl extensions

They were marked as core-only.


  Commit: 2635eab6d1ef7dcd3d7e4ce408f8a30c108f71b4
      
https://github.com/Perl/perl5/commit/2635eab6d1ef7dcd3d7e4ce408f8a30c108f71b4
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Move declaration

Future commits make the new location a better choice


  Commit: 3783dac29fd28b8fb3695bbb3b2483833e211737
      
https://github.com/Perl/perl5/commit/3783dac29fd28b8fb3695bbb3b2483833e211737
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: Move declaration to first use


  Commit: 92dcf59a90bfbb545599098d7043c96abb783ee5
      
https://github.com/Perl/perl5/commit/92dcf59a90bfbb545599098d7043c96abb783ee5
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M embed.h
    M perl.h
    M regen/embed.pl

  Log Message:
  -----------
  Gain control of macro namespace visibility

This commit adds the capability to undefine macros that are visible to
XS code but shouldn't be.  This can be used to stop macro namespace
pollution by perl.

It works by changing embed.h to have two modes, controlled by a #ifdef
that is set by perl.h.  perl.h now #includes embed.h twice.  The first
time works as it always has.  The second sets the #ifdef, and causes
embed.h to #undef the macros that shouldn't be visible.  This call is
just before perl.h returns to its includer, so that these macros have
come and gone before the file that #included perl.h is affected by them.
It comes after the inline headers get included, so they have access to
all the symbols that are defined.

The list of macros is determined by the visibility given by the apidoc
lines documenting them, plus several exception lists that allow a symbol
to be visible even though it is not documented as such.

In this commit, the main exception list contains everything that is
currently visible outside the Perl core, so this should not break any
code.  But it means that the visibility control is established for
future changes to our code base.  New macros will not be visible except
when documented as needing to be such.  We can no longer inadvertently
add new names to pollute the user's.

I expect that over time, the exception list will become smaller, as we
go through it and remove the items that really shouldn't be visible.  We
can then see via smoking if someone is actually using them, and either
decide that these should be visible, or work with the module author for
another way to accomplish their needs.  (I would hope this would lead to
proper documentation of the ones that need to be visible.)

There are currently four lists of symbols.

One list is for symbols that are used by libc functions, and that Perl
may redefine (usually so that code doesn't have to know if it is running
on a platform that is lacking the given feature.)  The algorithm added
here catches most of these and keeps them visible, but there are a few
items that currently must be manually listed.

A second list is of symbols that the re extension to Perl requires, but
no one else needs to.  This list is currently empty, as everything
initially is in the main exception list.

A third list is for items that other Perl extensions require, but no one
else needs to.  This list is currently empty, as everything initially is
in the main exception list.

The final list is for items that currently are visible to the whole
world.  It contains thousands of items.  This list should be examined
for:

    1) Names that shouldn't be so visible; and
    2) Names that need to remain visible but should be changed so they
       are less likely to clash with anything the user might come up
       with.

I have wanted this ability to happen for a long time; and now things
have come together to enable it.

This allows us to have a clear-cut boundary with CPAN.

It means you can add macros that have internal-only use without having
to worry about making them likely not to clash with user names.

It shows precisely in one place what our names are that are visible to
CPAN.


  Commit: b847495def21301a78c7aad050b8d47d51482258
      
https://github.com/Perl/perl5/commit/b847495def21301a78c7aad050b8d47d51482258
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M regen/HeaderParser.pm
    M regen/embed.pl

  Log Message:
  -----------
  Macros guarded by some #ifdef's aren't globally visible

The previous commit undefines macros that aren't supposed to be visible
to XS code.  But, to avoid any possible breakage, it creates an
exception list of symbols that may have been visible, and leaves them
so.  The goal is to stop the list from growing as new code is developed,
and to shorten the list by various means.

This is the first commit to do that, by looking to see if any symbols
aren't actually externally visible because they are guarded by #ifdef's
that evaluate to false.  For example a symbol that is #defined only if
PERL_CORE is defined won't be visible, and need not be on the exception
list.

This cuts almost 30% off the initial list.


  Commit: ebbe6ac0f7628af109f6d3fdcc0bc859c8236ce8
      
https://github.com/Perl/perl5/commit/ebbe6ac0f7628af109f6d3fdcc0bc859c8236ce8
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M embed.h
    M regen/embed.pl

  Log Message:
  -----------
  Remove a few more macros from being visible to XS code

These are a few macros dealing with inversion lists that were never
intended to be visible to general XS code, and they actually can't be in
use in cpan because the mechanisms to create inversion lists are private
to perl.


  Commit: 7e1ae0c850febc62d152ad00d44c48954a6b66cc
      
https://github.com/Perl/perl5/commit/7e1ae0c850febc62d152ad00d44c48954a6b66cc
  Author: Karl Williamson <[email protected]>
  Date:   2025-12-10 (Wed, 10 Dec 2025)

  Changed paths:
    M embed.h
    M regen/embed.pl

  Log Message:
  -----------
  Remove SBOX case statements from external visibility

I'm pretty sure there is no use case for these, and very unlikely to
have any actual uses.


Compare: https://github.com/Perl/perl5/compare/c0b8ab1ec691...7e1ae0c850fe

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

Reply via email to