h2ph: handle function pointer constants.
Jarkko Hietaniemi [Sat, 8 Jun 2002 14:22:10 +0000 (14:22 +0000)]
p4raw-id: //depot/perl@17093

utils/h2ph.PL

index 783dfc6..206df49 100644 (file)
@@ -115,6 +115,7 @@ while (defined (my $file = next_file())) {
                $name = $1;
                $new = '';
                s/\s+$//;
+               s/\(\w+\s*\(\*\)\s*\(\w*\)\)\s*(-?\d+)/$1/; # (int (*)(foo_t))0
                if (s/^\(([\w,\s]*)\)//) {
                    $args = $1;
                    my $proto = '() ';