This is so the existing comparison routines don't show that things are
different solely because of white space differences
(cherry picked from commit
93e8c96d2cd21f17b16636c3876a7960ef48b74e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
for (keys %{$data->{prototypes}}) {
$prototypes{$_} = $data->{prototypes}{$_};
+ $prototypes{$_} = normalize_prototype($data->{prototypes}{$_});
$data->{implementation} =~ s/^$_(?=\s*\()/$DPPP(my_$_)/mg;
}
return @func;
}
+sub normalize_prototype # So that they can be compared more easily
+{
+ my $proto = shift;
+ $proto =~ s/\s* \* \s* / * /xg;
+ return $proto;
+}
+
sub make_prototype
{
my $f = shift;
my $proto;
my $pTHX_ = exists $f->{flags}{T} ? "" : "pTHX_ ";
$proto = "$f->{ret} $f->{name}" . "($pTHX_" . join(', ', @args) . ')';
- return $proto;
+ return normalize_prototype($proto);
}
sub format_version