diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index c8f758dc041b..90f2a97f2cb9 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -528,7 +528,7 @@ package Maintainers; }, 'ExtUtils::ParseXS' => { - 'DISTRIBUTION' => 'LEONT/ExtUtils-ParseXS-3.57.tar.gz', + 'DISTRIBUTION' => 'LEONT/ExtUtils-ParseXS-3.58.tar.gz', 'FILES' => q[dist/ExtUtils-ParseXS], }, diff --git a/dist/ExtUtils-ParseXS/Changes b/dist/ExtUtils-ParseXS/Changes index b95808876adc..07143743f339 100644 --- a/dist/ExtUtils-ParseXS/Changes +++ b/dist/ExtUtils-ParseXS/Changes @@ -1,5 +1,18 @@ Revision history for Perl extension ExtUtils::ParseXS. +3.59 + - Throw an exception when combining the length operator with a + typemap other than T_PV + +3.58 Sun Jul 20 09:10:41 PM CEST 2025 + - ExtUtils::ParseXS has been extensively restructured internally. + Most of these changes shouldn't be visible externally, but might + affect XS code which was using invalid or unsupported syntax. + +3.57 Fri May 2 05:40:59 PM CEST 2025 + - Rewrite half of the internals to facilitate refcounted stack + later on + 3.51 - Tue May 9 09:32:04 2023 AEST - Initialize $self correctly in EU::PXS::Utilities::death() - C++ builds: avoid generating C<< extern "C" extern "C" >> diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm index 5f2af06b40d4..026f7248f9f7 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm @@ -64,7 +64,7 @@ use Symbol; our $VERSION; BEGIN { - $VERSION = '3.58'; + $VERSION = '3.59'; require ExtUtils::ParseXS::Constants; ExtUtils::ParseXS::Constants->VERSION($VERSION); require ExtUtils::ParseXS::CountLines; ExtUtils::ParseXS::CountLines->VERSION($VERSION); require ExtUtils::ParseXS::Node; ExtUtils::ParseXS::Node->VERSION($VERSION); diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm index 58f0747e3391..5779fe2639e9 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Constants.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Symbol; -our $VERSION = '3.58'; +our $VERSION = '3.59'; =head1 NAME diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm index 8b36eaa5542a..17ec1e17378e 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/CountLines.pm @@ -1,7 +1,7 @@ package ExtUtils::ParseXS::CountLines; use strict; -our $VERSION = '3.58'; +our $VERSION = '3.59'; our $SECTION_END_MARKER; diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm index a0b9e7af99b6..a4d6eee6cb06 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Eval.pm @@ -2,7 +2,7 @@ package ExtUtils::ParseXS::Eval; use strict; use warnings; -our $VERSION = '3.58'; +our $VERSION = '3.59'; =head1 NAME diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm index 245e6c01279e..708d3f92cc36 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm @@ -2,7 +2,7 @@ package ExtUtils::ParseXS::Node; use strict; use warnings; -our $VERSION = '3.58'; +our $VERSION = '3.59'; =head1 NAME @@ -1407,7 +1407,9 @@ sub lookup_input_typemap { # as a pseudo-parameter, then override the normal typedef - which # would emit SvPV_nolen(...) - and instead, emit SvPV(..., # STRLEN_length_of_foo) - if ($xstype eq 'T_PV' and $self->{has_length}) { + if ($self->{has_length}) { + die "length(NAME) not supported with typemaps other than T_PV" + if $xstype ne 'T_PV'; die "default value not supported with length(NAME) supplied" if defined $default; return "($type)SvPV($arg, STRLEN_length_of_$var);", diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm index 41cd3c50026f..cf92780b6881 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm @@ -5,7 +5,7 @@ use Exporter; use File::Spec; use ExtUtils::ParseXS::Constants (); -our $VERSION = '3.58'; +our $VERSION = '3.59'; our (@ISA, @EXPORT_OK); @ISA = qw(Exporter); diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm index a17acfde71c1..f26a32979dd7 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm @@ -2,7 +2,7 @@ package ExtUtils::Typemaps; use 5.006001; use strict; use warnings; -our $VERSION = '3.58'; +our $VERSION = '3.59'; require ExtUtils::ParseXS; require ExtUtils::ParseXS::Constants; diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Cmd.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Cmd.pm index 3cbf58ffa8ea..927b2c6a6aa8 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Cmd.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Cmd.pm @@ -2,7 +2,7 @@ package ExtUtils::Typemaps::Cmd; use 5.006001; use strict; use warnings; -our $VERSION = '3.58'; +our $VERSION = '3.59'; use ExtUtils::Typemaps; diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/InputMap.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/InputMap.pm index cd6442f950c2..b981ee45067e 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/InputMap.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/InputMap.pm @@ -2,7 +2,7 @@ package ExtUtils::Typemaps::InputMap; use 5.006001; use strict; use warnings; -our $VERSION = '3.58'; +our $VERSION = '3.59'; =head1 NAME diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm index b15d832fa1bb..6ba1d936918f 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm @@ -2,7 +2,7 @@ package ExtUtils::Typemaps::OutputMap; use 5.006001; use strict; use warnings; -our $VERSION = '3.58'; +our $VERSION = '3.59'; =head1 NAME diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm index a60890c8b6bb..ed2b52aefcbe 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm @@ -4,7 +4,7 @@ use strict; use warnings; require ExtUtils::Typemaps; -our $VERSION = '3.58'; +our $VERSION = '3.59'; =head1 NAME diff --git a/dist/ExtUtils-ParseXS/lib/perlxs.pod b/dist/ExtUtils-ParseXS/lib/perlxs.pod index c8bed4c6c160..2e87b45346f8 100644 --- a/dist/ExtUtils-ParseXS/lib/perlxs.pod +++ b/dist/ExtUtils-ParseXS/lib/perlxs.pod @@ -2231,7 +2231,7 @@ this model, the less likely conflicts will occur. =head1 XS VERSION This document covers features supported by C -(also known as C) 3.58. +(also known as C) 3.59. =head1 AUTHOR DIAGNOSTICS diff --git a/dist/ExtUtils-ParseXS/t/001-basic.t b/dist/ExtUtils-ParseXS/t/001-basic.t index 5101a9d45959..3b84dbc31443 100644 --- a/dist/ExtUtils-ParseXS/t/001-basic.t +++ b/dist/ExtUtils-ParseXS/t/001-basic.t @@ -967,7 +967,7 @@ EOF | |int |foo( a , char * b , OUT int c , OUTLIST int d , \ - | IN_OUT char * * e = 1 + 2 , long length(e) , \ + | IN_OUT char * * e = 1 + 2 , long length(b) , \ | char* f="abc" , g = 0 , ... ) EOF @@ -1607,6 +1607,13 @@ EOF [ 1, 0, qr{\QError: length() on non-parameter 's'\E.*line 6}, "got expected error" ], ], + + [ + 'length of int is invalid', + ['int', 'foo(int a, size_t length(a))'], + [ 1, 0 , qr/length\(NAME\) not supported with typemaps other than T_PV/, 'Got expected error about length' ], + ], + ); test_many($preamble, 'XS_Foo_', \@test_fns);