From fc6aef98f51e092c1f5912343d85fe904363efe9 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 12 Jul 2019 10:43:35 -0600 Subject: [PATCH] PPPort_pm.PL: Prototypes differing only in pTHX_ Use special wording for these, as this can be an unavoidable issue for very early perls that don't port thread context back that far. (cherry picked from commit b8a73dca70de398e16e70857f461cc88d99ac5c8) Signed-off-by: Nicolas R --- dist/Devel-PPPort/PPPort_pm.PL | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dist/Devel-PPPort/PPPort_pm.PL b/dist/Devel-PPPort/PPPort_pm.PL index b2fb34a..2eee616 100644 --- a/dist/Devel-PPPort/PPPort_pm.PL +++ b/dist/Devel-PPPort/PPPort_pm.PL @@ -286,7 +286,14 @@ sub expand_pp_expr my $proto = make_prototype($e); if (exists $prototypes{$func}) { if (compare_prototypes($proto, $prototypes{$func})) { - check(1, "differing prototypes for $func:\n API: $proto\n PPP: $prototypes{$func}"); + my $proto_no_pTHX = $proto; + $proto_no_pTHX =~ s/pTHX_\s*//; + if (compare_prototypes($proto_no_pTHX, $prototypes{$func})) { + check(1, "differing prototypes for $func:\n API: $proto\n PPP: $prototypes{$func}"); + } + else { + check(1, "prototypes differ in pTHX_ for $func:\n API: $proto\n PPP: $prototypes{$func}"); + } $proto = $prototypes{$func}; } } -- 1.8.3.1