summaryrefslogtreecommitdiff
path: root/autodoc.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-10-22 09:14:15 -0600
committerKarl Williamson <khw@cpan.org>2022-06-17 07:32:40 -0600
commit746dd61624d3d204c6d927134f9988342c15393d (patch)
tree39a78009ab323088d7d9db01fd39cd4739df89ed /autodoc.pl
parent13c71e252dd585f275d6b3620106def76a243886 (diff)
downloadperl-746dd61624d3d204c6d927134f9988342c15393d.tar.gz
Add '#' flag for autodoc entries
This indicates the symbol is accessed via #ifdef and is not a function or a macro with a returned value
Diffstat (limited to 'autodoc.pl')
-rw-r--r--autodoc.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/autodoc.pl b/autodoc.pl
index 0a8d74597b..65e6f9d969 100644
--- a/autodoc.pl
+++ b/autodoc.pl
@@ -529,13 +529,19 @@ sub autodoc ($$) { # parse a file and extract documentation info
}
die "flag '$1' is not legal (for function $element_name (from $file))"
- if $flags =~ / ( [^AabCDdEeFfGhiIMmNnTOoPpRrSUuWXxy;] ) /x;
+ if $flags =~ / ( [^AabCDdEeFfGhiIMmNnTOoPpRrSsUuWXxy;#] ) /x;
die "'u' flag must also have 'm' or 'y' flags' for $element_name"
if $flags =~ /u/ && $flags !~ /[my]/;
warn ("'$element_name' not \\w+ in '$proto_in_file' in $file")
if $flags !~ /N/ && $element_name !~ / ^ [_[:alpha:]] \w* $ /x;
+ if ($flags =~ /#/) {
+ die "Return type must be empty for '$element_name'"
+ if $ret_type;
+ $ret_type = '#ifdef';
+ }
+
if (exists $seen{$element_name} && $flags !~ /h/) {
die ("'$element_name' in $file was already documented in $seen{$element_name}");
}