.1]; as Re: [PATCH 5.6.1-TRIAL1 and @8223]; was Re: Perlbug 20000322.006 status update
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / xsubpp
index 6724c59..2093633 100755 (executable)
@@ -1079,7 +1079,7 @@ while (fetch_para()) {
 
     $orig_args =~ s/\\\s*/ /g;         # process line continuations
 
-    my %only_output;
+    my %only_outlist;
     if ($process_argtypes and $orig_args =~ /\S/) {
        my $args = "$orig_args ,";
        if ($args =~ /^( (??{ $C_arg }) , )* $ /x) {
@@ -1105,7 +1105,7 @@ while (fetch_para()) {
                    $arg_types{$name} = $arg;
                    $_ = "$name$default";
                }
-               $only_output{$_} = 1 if $out_type =~ /^OUT/;
+               $only_outlist{$_} = 1 if $out_type eq "OUTLIST";
                push @outlist, $name if $out_type =~ /OUTLIST$/;
                $in_out{$name} = $out_type if $out_type;
            }
@@ -1119,7 +1119,7 @@ while (fetch_para()) {
            if ($process_inout and s/^(IN|IN_OUTLIST|OUTLIST|IN_OUT|OUT)\s+//) {
                my $out_type = $1;
                next if $out_type eq 'IN';
-               $only_output{$_} = 1 if $out_type =~ /^OUT/;
+               $only_outlist{$_} = 1 if $out_type eq "OUTLIST";
                push @outlist, $name if $out_type =~ /OUTLIST$/;
                $in_out{$_} = $out_type;
            }
@@ -1144,7 +1144,7 @@ while (fetch_para()) {
                        last;
                    }
            }
-           if ($only_output{$args[$i]}) {
+           if ($only_outlist{$args[$i]}) {
                push @args_num, undef;
            } else {
                push @args_num, ++$num_args;
@@ -1183,6 +1183,7 @@ while (fetch_para()) {
 
     # print function header
     print Q<<"EOF";
+#XS(XS_${Full_func_name}); /* prototype to pass -Wmissing-prototypes */
 #XS(XS_${Full_func_name})
 #[[
 #    dXSARGS;
@@ -1502,6 +1503,7 @@ print Q<<"EOF";
 EOF
 
 print Q<<"EOF";
+#XS(boot_$Module_cname); /* prototype to pass -Wmissing-prototypes */
 #XS(boot_$Module_cname)
 EOF