aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Feist <shabble@cowu.be>2010-07-24 16:31:52 +0000
committerTom Feist <shabble@cowu.be>2010-07-24 16:31:52 +0000
commit6a214e7c32a6a4a159ba3f24312f4b519c6352af (patch)
tree114e00b90b8d65194f8742554ded91373cd00af8
parentmore doc stuffs (diff)
downloadirssi-scripts-6a214e7c32a6a4a159ba3f24312f4b519c6352af.tar.gz
irssi-scripts-6a214e7c32a6a4a159ba3f24312f4b519c6352af.zip
modified parse_xsfuncs to output arguments as well
Diffstat (limited to '')
-rwxr-xr-xdocs/parse_xsfuncs.pl27
1 files changed, 24 insertions, 3 deletions
diff --git a/docs/parse_xsfuncs.pl b/docs/parse_xsfuncs.pl
index 2a97516..d26cb2b 100755
--- a/docs/parse_xsfuncs.pl
+++ b/docs/parse_xsfuncs.pl
@@ -31,16 +31,37 @@ sub process_file {
$parser->preprocess_pods;
$parser->clean_out_empty_pods;
- #print Dumper($parser->{data}), $/;
+# print Dumper($parser->{data}), $/;
my $data = $parser->{data};
foreach my $package (keys %$data) {
#print "Package: $package\n";
my $subs = $data->{$package}->{xsubs};
foreach my $sub (@$subs) {
+
my $sub_name = $sub->{symname};
+
+ my $args_str = '';
+ my @processed_args = ();
+ my $args = $sub->{args};
+
+ foreach my $arg (@$args) {
+ my $type = $arg->{type} // '';
+ if ($type eq 'char *') {
+ $type = 'string';
+ } elsif ($type eq 'SV *') {
+ $type = 'SVptr';
+ }
+ my $aname = $arg->{name} // '';
+ if ($aname eq '...') {
+ push @processed_args, '...';
+ } else {
+ push @processed_args, $type . ' $' . $aname;
+ }
+ }
+ $args_str = join(", ", @processed_args);
+
next if $sub_name =~ m/::$/;
- #print_msglevel($sub_name);
- print $sub->{symname}, $/;
+ print $sub->{symname}, "(", $args_str, ")\n";
}
}
}