[Perl/perl5] 531b62: perlfunc - defang warning about ref() and add warn...

2024-06-17 Thread Dan Book via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 531b623ae4a4f4e3ec7f00f8479e5844514dffbc
  
https://github.com/Perl/perl5/commit/531b623ae4a4f4e3ec7f00f8479e5844514dffbc
  Author: Dan Book 
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
M pod/perlfunc.pod

  Log Message:
  ---
  perlfunc - defang warning about ref() and add warning about using reftype() 
on objects

Also, move the pointer to "isa" up to the paragraph discussing blessed 
references, and point to "builtin" instead of "Scalar::Util".



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


[Perl/perl5] dbaf52: my_strnlen(): eliminate unneeded casting away of c...

2024-06-17 Thread Tony Cook via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: dbaf52f602f7474231460fe8930b3c5564df10c5
  
https://github.com/Perl/perl5/commit/dbaf52f602f7474231460fe8930b3c5564df10c5
  Author: Tony Cook 
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
M inline.h

  Log Message:
  ---
  my_strnlen(): eliminate unneeded casting away of const

Noticed this while reviewing #22271.

If you build with:

  ./Configure -des -Dusedevel -Ud_strnlen -Accflags=-Wcast-qual -Dcc=g++

you will see amongst many other warnings:

inline.h: In function ‘size_t Perl_my_strnlen(const char*, size_t)’:
inline.h:4220:23: warning: cast from type ‘const void*’ to type ‘char*’ casts 
away qualifiers [-Wcast-qual]
 4220 | const char *end = (char *) memchr(str, '\0', maxlen);
  |   ^~

The cast itself is only needed on C++ to cast from "const void *", C
doesn't require any cast here.


  Commit: ca81be37067e1358d98f77b8f7df53cc22a554b6
  
https://github.com/Perl/perl5/commit/ca81be37067e1358d98f77b8f7df53cc22a554b6
  Author: Tony Cook 
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
M utf8.h

  Log Message:
  ---
  UTF8_CHK_SKIP: eliminate casting away const

Seen with:

  ./Configure -des -Dusedevel -Accflags=-Wcast-qual

mathoms.c: In function ‘Perl_utf8_to_uvchr’:
utf8.h:804:53: warning: cast discards ‘const’ qualifier from pointer target type
 [-Wcast-qual]
  804 |(UNLIKELY(s[0] == '\0') ? 1 : my_strnlen((char *) (s), UTF8SK
IP(s)))
  | ^
embed.h:792:87: note: in definition of macro ‘utf8_to_uvchr_buf_helper’
  792 | # define utf8_to_uvchr_buf_helper(a,b,c)Perl_utf8_to_uvchr_buf_h
elper(aTHX_ a,b,c)
  |
  ^
mathoms.c:970:12: note: in expansion of macro ‘utf8_to_uvchr_buf’
  970 | return utf8_to_uvchr_buf(s, s + UTF8_CHK_SKIP(s), retlen);
  |^
mathoms.c:970:37: note: in expansion of macro ‘UTF8_CHK_SKIP’
  970 | return utf8_to_uvchr_buf(s, s + UTF8_CHK_SKIP(s), retlen);
  | ^

mathoms.c seems to be the only user of this macro.

This came up when reviewing #22271


Compare: https://github.com/Perl/perl5/compare/6c1a9be7c8b2...ca81be37067e

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


[Perl/perl5] 6c1a9b: perlapi: Combine sv_dump, sv_dump_depth into one e...

2024-06-17 Thread Karl Williamson via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 6c1a9be7c8b2803744ebb15f39a34f1e73efb53a
  
https://github.com/Perl/perl5/commit/6c1a9be7c8b2803744ebb15f39a34f1e73efb53a
  Author: Karl Williamson 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M dump.c

  Log Message:
  ---
  perlapi: Combine sv_dump, sv_dump_depth into one entry



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


[Perl/perl5] 9b74ed: Bump version of ExtUtils::ParseXS

2024-06-17 Thread Leon Timmermans via perl5-changes
  Branch: refs/heads/typemap-quotes
  Home:   https://github.com/Perl/perl5
  Commit: 9b74ed725df47abaaef53ab79a12505565fe9985
  
https://github.com/Perl/perl5/commit/9b74ed725df47abaaef53ab79a12505565fe9985
  Author: Leon Timmermans 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Cmd.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/InputMap.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm
M dist/ExtUtils-ParseXS/lib/perlxs.pod

  Log Message:
  ---
  Bump version of ExtUtils::ParseXS



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


[Perl/perl5] ed249a: Bump version over ExtUtils::ParseXS

2024-06-17 Thread Leon Timmermans via perl5-changes
  Branch: refs/heads/typemap-quotes
  Home:   https://github.com/Perl/perl5
  Commit: ed249a3774418c5f1626d44fb9ad903ee8fe9221
  
https://github.com/Perl/perl5/commit/ed249a3774418c5f1626d44fb9ad903ee8fe9221
  Author: Leon Timmermans 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Cmd.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/InputMap.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm
M dist/ExtUtils-ParseXS/lib/perlxs.pod

  Log Message:
  ---
  Bump version over ExtUtils::ParseXS



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


[Perl/perl5] 297399: Use alert control character as quoting character i...

2024-06-17 Thread Leon Timmermans via perl5-changes
  Branch: refs/heads/typemap-quotes
  Home:   https://github.com/Perl/perl5
  Commit: 2973993dd08df819a06e076ab024035940b8ec2c
  
https://github.com/Perl/perl5/commit/2973993dd08df819a06e076ab024035940b8ec2c
  Author: Leon Timmermans 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm

  Log Message:
  ---
  Use alert control character as quoting character in INPUT templates

This way, one no longer needs to escape double quotes inside an input
template.

Parsexs has done this for OUTPUT templates since the very beginning, I
can't find any reason for why we weren't also doing it for INPUT
templates.


  Commit: e34aff164881c221cf06f1048b8092e4ad3ea4ce
  
https://github.com/Perl/perl5/commit/e34aff164881c221cf06f1048b8092e4ad3ea4ce
  Author: Leon Timmermans 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M lib/ExtUtils/typemap

  Log Message:
  ---
  Simplify global typemap


  Commit: e6f1eca8739f84a2a215642b7d10ebcbc13fee89
  
https://github.com/Perl/perl5/commit/e6f1eca8739f84a2a215642b7d10ebcbc13fee89
  Author: Leon Timmermans 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Cmd.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/InputMap.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm
M dist/ExtUtils-ParseXS/lib/perlxs.pod

  Log Message:
  ---
  Bump version


Compare: https://github.com/Perl/perl5/compare/659336ec553f...e6f1eca8739f

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


[Perl/perl5] 52e5ca: Use alert control character as quoting character i...

2024-06-17 Thread Leon Timmermans via perl5-changes
  Branch: refs/heads/typemap-quotes
  Home:   https://github.com/Perl/perl5
  Commit: 52e5ca82a0352e2d143e98b2adcf248912a90001
  
https://github.com/Perl/perl5/commit/52e5ca82a0352e2d143e98b2adcf248912a90001
  Author: Leon Timmermans 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm

  Log Message:
  ---
  Use alert control character as quoting character in INPUT templates

This way, one no longer needs to escape double quotes inside an input
template. It also cleans up the standard typemaps to make use of this.

Parsexs has done this for OUTPUT templates since the very beginning, I
can't find any reason for why we weren't also doing it for INPUT
templates.


  Commit: 6524ba4650eb6cc47bef37dd5ec54d34d68e65d0
  
https://github.com/Perl/perl5/commit/6524ba4650eb6cc47bef37dd5ec54d34d68e65d0
  Author: Leon Timmermans 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M lib/ExtUtils/typemap

  Log Message:
  ---
  Simplify global typemap


  Commit: 659336ec553fdf9afe10756a5290bd5252240f02
  
https://github.com/Perl/perl5/commit/659336ec553fdf9afe10756a5290bd5252240f02
  Author: Leon Timmermans 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Cmd.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/InputMap.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm
M dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm
M dist/ExtUtils-ParseXS/lib/perlxs.pod

  Log Message:
  ---
  Bump version


Compare: https://github.com/Perl/perl5/compare/52e5ca82a035%5E...659336ec553f

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


[Perl/perl5]

2024-06-17 Thread iabyn via perl5-changes
  Branch: refs/heads/davem/eval_compiled
  Home:   https://github.com/Perl/perl5

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


[Perl/perl5] d06d71: add CvEVAL_COMPILED() flag and fix closure bug.

2024-06-17 Thread iabyn via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: d06d7106c2a33ff04a79463396bd9139f41380e3
  
https://github.com/Perl/perl5/commit/d06d7106c2a33ff04a79463396bd9139f41380e3
  Author: David Mitchell 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M cv.h
M dump.c
M op.c
M pad.c
M t/op/eval.t

  Log Message:
  ---
  add CvEVAL_COMPILED() flag and fix closure bug.

EVAL CVs are treated a bit weirdly: their CvROOT() and CvSTART() fields
don't get populated; instead the current values are stored in the
PL_eval_root and PL_eval_start variables while they are being executed.

This caused a bug in closures and nested evals when an inner eval was
repeated twice. The first inner eval accessed an outer lexical, which
caused a fake cache entry to be added to the outer eval's pad. The
second inner eval finds this cached entry, but incorrectly concludes
that the outer eval is in fact an anon sub prototype and issues a
'variable is not available' warning. This is due to this simplistic
definition in pad.c:

#define CvCOMPILED(cv) CvROOT(cv)

This commit adds a new flag, CvEVAL_COMPILED(), to indicate a
fully-compiled EVAL CV. This allows us to work around the limitation.

In an ideal world this would have been fixed instead by making EVAL CVs
first-class citizens with CvROOT() etc, but plenty of stuff seems to
assume otherwise. So I took the path of least resistance.

See https://www.perlmonks.org/?node_id=11158351



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


[Perl/perl5] d06d71: add CvEVAL_COMPILED() flag and fix closure bug.

2024-06-17 Thread iabyn via perl5-changes
  Branch: refs/heads/davem/eval_compiled
  Home:   https://github.com/Perl/perl5
  Commit: d06d7106c2a33ff04a79463396bd9139f41380e3
  
https://github.com/Perl/perl5/commit/d06d7106c2a33ff04a79463396bd9139f41380e3
  Author: David Mitchell 
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
M cv.h
M dump.c
M op.c
M pad.c
M t/op/eval.t

  Log Message:
  ---
  add CvEVAL_COMPILED() flag and fix closure bug.

EVAL CVs are treated a bit weirdly: their CvROOT() and CvSTART() fields
don't get populated; instead the current values are stored in the
PL_eval_root and PL_eval_start variables while they are being executed.

This caused a bug in closures and nested evals when an inner eval was
repeated twice. The first inner eval accessed an outer lexical, which
caused a fake cache entry to be added to the outer eval's pad. The
second inner eval finds this cached entry, but incorrectly concludes
that the outer eval is in fact an anon sub prototype and issues a
'variable is not available' warning. This is due to this simplistic
definition in pad.c:

#define CvCOMPILED(cv) CvROOT(cv)

This commit adds a new flag, CvEVAL_COMPILED(), to indicate a
fully-compiled EVAL CV. This allows us to work around the limitation.

In an ideal world this would have been fixed instead by making EVAL CVs
first-class citizens with CvROOT() etc, but plenty of stuff seems to
assume otherwise. So I took the path of least resistance.

See https://www.perlmonks.org/?node_id=11158351



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