Branch: refs/heads/named-initialisers-for-mgvtbl
  Home:   https://github.com/Perl/perl5
  Commit: 625cd9821c97aea5e76dab794bf7288a6991d191
      
https://github.com/Perl/perl5/commit/625cd9821c97aea5e76dab794bf7288a6991d191
  Author: Paul "LeoNerd" Evans <leon...@leonerd.org.uk>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M doio.c
    M ext/PerlIO-encoding/encoding.pm
    M ext/PerlIO-encoding/encoding.xs
    M ext/PerlIO-via/via.pm
    M ext/PerlIO-via/via.xs
    M ext/XS-APItest/APItest.pm
    M ext/XS-APItest/APItest.xs
    M op.c

  Log Message:
  -----------
  Use C99 named initialisers in core structs that define MGVTBLs

Since most Magic vtables do not provide every function, using C99 named
initialisers allows us to more easily specify which ones are present, so
readers don't have to count commas. Additionally provides a layer of
robustness in case more functions are added in future.


  Commit: 6911fd72a16d90bd5e8c257cb496f3fcd5dc08f6
      
https://github.com/Perl/perl5/commit/6911fd72a16d90bd5e8c257cb496f3fcd5dc08f6
  Author: Paul "LeoNerd" Evans <leon...@leonerd.org.uk>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

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

  Log Message:
  -----------
  Also use C99 named initialisers in mg_vtable.h

These named initialisers are not permitted by C++ compilers using
standards older than C++20, but fortunately even though they appear in
mg_vtable.h and hence perl.h, they are hidden behind an `#ifdef` that is
only defined when compiling `globals.c`, so this should be fine.


  Commit: 93756871545175d4edd5a9d53f76bf98842271f2
      
https://github.com/Perl/perl5/commit/93756871545175d4edd5a9d53f76bf98842271f2
  Author: Dagfinn Ilmari Mannsåker <ilm...@ilmari.org>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

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

  Log Message:
  -----------
  Use C99 designated array initalisers as well in mg_vtable.h


  Commit: fe2e0d3a3999c8c228b7a13eb253a0c1cd56d3aa
      
https://github.com/Perl/perl5/commit/fe2e0d3a3999c8c228b7a13eb253a0c1cd56d3aa
  Author: Dagfinn Ilmari Mannsåker <ilm...@ilmari.org>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

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

  Log Message:
  -----------
  Keep trailing comma in PL_magic_vtable(_name)s definitions

C99 allows trailing commas in on struct and table initialisers, so get
rid of the code to avoid it in PL_magic_vtables and adjust the _names
code to match.

We don't add it to the enum, since magic_vtable_max is always the last
element, so there won't be any diff noise from adding new elements
after it.


Compare: https://github.com/Perl/perl5/compare/625cd9821c97%5E...fe2e0d3a3999

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

Reply via email to