From: Tim Bunce Date: Mon, 27 Jan 1997 16:59:06 +0000 (+0000) Subject: xsubpp handing of void funcs breaks extensions using XST_m*() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c5fb52b645bfa15a7252f6d5be4457f847709b7;p=p5sagit%2Fp5-mst-13.2.git xsubpp handing of void funcs breaks extensions using XST_m*() private-msgid: <9701271659.AA15137@toad.ig.co.uk> --- diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index 74e3250..d655a26 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