diff options
Diffstat (limited to 'lib/ExtUtils/xsubpp')
-rwxr-xr-x | lib/ExtUtils/xsubpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index 74e325013c..d655a26ba6 100755 --- a/lib/ExtUtils/xsubpp +++ b/lib/ExtUtils/xsubpp @@ -842,7 +842,10 @@ while (fetch_para()) { $PPCODE = grep(/^\s*PPCODE\s*:/, @line); $CODE = grep(/^\s*CODE\s*:/, @line); - $EXPLICIT_RETURN = $CODE && ("@line" =~ /\bST\s*\([^;]*=/ ); + # Detect CODE: blocks which use ST(n)= or XST_m*(n,v) + # to set explicit return values. + $EXPLICIT_RETURN = ($CODE && + ("@line" =~ /(\bST\s*\([^;]*=) | (\bXST_m\w+\s*\()/x )); $ALIAS = grep(/^\s*ALIAS\s*:/, @line); # print function header |