diff options
author | Ben Morrow <ben@morrow.me.uk> | 2009-12-09 10:24:33 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-07-12 10:40:48 +0200 |
commit | 5afac1ebc358bec5c061fc10d4c7122f0efebb22 (patch) | |
tree | 6654cdba8ec0655b561a11f8a82f36e4b9907ea4 /autodoc.pl | |
parent | 13b6b3bc35857242218431a6326dd7a59703afdd (diff) | |
download | perl-5afac1ebc358bec5c061fc10d4c7122f0efebb22.tar.gz |
Teach autodoc.pl about 'o' functions.
That is, functions with no #define foo Perl_foo. I'm not certain this is
the right way to do it, as I don't really understand which flags autodoc
honours from which places; currently, it's necessary to put the 'o' flag
on the =for apidoc line or it will be ignored.
Diffstat (limited to 'autodoc.pl')
-rw-r--r-- | autodoc.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/autodoc.pl b/autodoc.pl index 285bc3a5b3..91963ca5ac 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -132,6 +132,8 @@ sub docout ($$$) { # output the docs for one function removed without notice.\n\n" if $flags =~ /x/; $docs .= "NOTE: the perl_ form of this function is deprecated.\n\n" if $flags =~ /p/; + $docs .= "NOTE: this function must be explicitly called as Perl_$name with an aTHX_ parameter.\n\n" + if $flags =~ /o/; print $fh "=item $name\nX<$name>\n$docs"; @@ -141,6 +143,10 @@ removed without notice.\n\n" if $flags =~ /x/; print $fh "\t\t$name;\n\n"; } elsif ($flags =~ /n/) { # no args print $fh "\t$ret\t$name\n\n"; + } elsif ($flags =~ /o/) { # no #define foo Perl_foo + print $fh "\t$ret\tPerl_$name"; + print $fh "(" . (@args ? "pTHX_ " : "pTHX"); + print $fh join(", ", @args) . ")\n\n"; } else { # full usage print $fh "\t$ret\t$name"; print $fh "(" . join(", ", @args) . ")"; |