Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dist/ExtUtils-ParseXS/Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Revision history for Perl extension ExtUtils::ParseXS.

3.60
- Fix INTERFACE for C23
- support perl package names in INTERFACE
- Cleanup typemap file-finding code and change priority
- Revert throwing an exception when combining the length operator
with a typemap other than T_PV

3.59
- Throw an exception when combining the length operator with a
typemap other than T_PV
Expand Down
4 changes: 1 addition & 3 deletions dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1412,9 +1412,7 @@ 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 ($self->{has_length}) {
die "length(NAME) not supported with typemaps other than T_PV"
if $xstype ne 'T_PV';
if ($xstype eq 'T_PV' and $self->{has_length}) {
die "default value not supported with length(NAME) supplied"
if defined $default;
return "($type)SvPV($arg, STRLEN_length_of_$var);",
Expand Down
9 changes: 1 addition & 8 deletions dist/ExtUtils-ParseXS/t/001-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ EOF
|
|int
|foo( a , char * b , OUT int c , OUTLIST int d , \
| IN_OUT char * * e = 1 + 2 , long length(b) , \
| IN_OUT char * * e = 1 + 2 , long length(e) , \
| char* f="abc" , g = 0 , ... )
EOF

Expand Down Expand Up @@ -1607,13 +1607,6 @@ 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);
Expand Down
Loading