Skip to content

Commit 5aac1f7

Browse files
committed
ExtUtils::ParseXS: remove XsubAlias field
This was a typo: the code should have been checking if the XsubAlias*es* field was defined, in order to remove a duplicate copy of the XSUB function name from an alias warning message.
1 parent e2f74e0 commit 5aac1f7

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,6 @@ BEGIN {
331331
'XsubAliasValues', # Hash of hash of bools: indicates which alias
332332
# names have been used for each value.
333333
'XsubAliasValueClashHinted', # Bool: an ALIAS warning-hint has been emitted.
334-
'XsubAlias', # XXX this field is almost certainly a typo
335-
# for XsubAliases.
336334

337335

338336
# Per-XSUB INPUT section parsing state:
@@ -2573,10 +2571,10 @@ sub get_aliases {
25732571
# it is NOT a mistake.
25742572
unless ($is_symbolic) {
25752573
my @keys= sort keys %{$self->{XsubAliasValues}->{$value}||{}};
2576-
# deal with an alias of 0, which might not be in the XsubAlias dataset
2577-
# yet as 0 is the default for the base function ($fname)
2574+
# deal with an alias of 0, which might not be in the XsubAliases
2575+
# dataset yet as 0 is the default for the base function ($fname)
25782576
push @keys, $fname
2579-
if $value eq "0" and !defined $self->{XsubAlias}{$fname};
2577+
if $value eq "0" and !defined $self->{XsubAliases}{$fname};
25802578
if (@keys and $self->{author_warnings}) {
25812579
# We do not warn about value collisions unless author_warnings
25822580
# are enabled. They aren't helpful to a module consumer, only

dist/ExtUtils-ParseXS/t/001-basic.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ like $stderr, '/No INPUT definition/', "Exercise typemap error";
266266
. " of 0 - the base function in XSAlias.xs, line 13\n"
267267
. "Warning: Aliases 'do' and 'xunx', 'do' have identical values"
268268
. " of 0 - the base function in XSAlias.xs, line 14\n"
269-
. "Warning: Aliases 'xunx2' and 'do', 'xunx', 'do' have"
269+
. "Warning: Aliases 'xunx2' and 'do', 'xunx' have"
270270
. " identical values of 0 - the base function in XSAlias.xs, line 15\n"
271271
,
272272
"Saw expected warnings from XSAlias.xs in AUTHOR_WARNINGS mode";

0 commit comments

Comments
 (0)