xsubpp handing of void funcs breaks extensions using XST_m*()
Tim Bunce [Mon, 27 Jan 1997 16:59:06 +0000 (16:59 +0000)]
private-msgid: <9701271659.AA15137@toad.ig.co.uk>

lib/ExtUtils/xsubpp

index 74e3250..d655a26 100755 (executable)
@@ -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