From 6c5fb52b645bfa15a7252f6d5be4457f847709b7 Mon Sep 17 00:00:00 2001 From: Tim Bunce Date: Mon, 27 Jan 1997 16:59:06 +0000 Subject: xsubpp handing of void funcs breaks extensions using XST_m*() private-msgid: <9701271659.AA15137@toad.ig.co.uk> --- lib/ExtUtils/xsubpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.1