Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions autodoc.pl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
use warnings;

my $known_flags_re =
qr/[ aA bC dD eE fF h iI mM nN oO pP rR sS T uU vW xX y ;@#? ] /xx;
qr/[ aA bC dD eE fF h iI mM nN oO pP rR sS T uU v W xX y ;@#? ] /xx;

# Flags that don't apply to this program, like implementation details.
my $irrelevant_flags_re = qr/[ ab eE iI P rR X? ]/xx;
Expand Down Expand Up @@ -617,7 +617,9 @@ sub check_and_add_proto_defn {

$flags .= "m" if $flags =~ /M/;
$flags .= "U" if $flags =~ /@/; # No usage output for @arrays
$flags .= "n" if $flags =~ /#/; # No threads, arguments for #ifdef
$flags .= "n" if $flags =~ /[#v]/; # No threads, arguments for #ifdef's,
# plain values


my @munged_args= $args_ref->@*;
s/\b(?:NN|NULLOK|[SM]PTR|EPTRQ?)\b\s+//g for @munged_args;
Expand Down Expand Up @@ -1904,9 +1906,9 @@ ($fh, $section_name, $element_name, $docref)

my $has_args = $flags !~ /n/;
if (! $has_args) {
warn "$name: n flag without [m#] "
warn "$name: n flag without [mv#] "
. where_from_string($item->{file}, $item->{line_num})
unless $flags =~ /[m#]/;
unless $flags =~ /[mv#]/;

if ($item->{args} && $item->{args}->@*) {
warn "$name: n flag but apparently has args"
Expand Down
9 changes: 8 additions & 1 deletion embed.fnc
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@
:
: The 'name' in any such line must not be the same as any in this file (i.e.,
: no redundant definitions), and one of the flags on the apidoc lines must be
: 'm', 'y', or '@', indicating it is not a function.
: 'm', 'v', 'y', or '@', indicating it is not a function.
:
: All but the name field of an apidoc_item line are optional, and if empty,
: inherits from a corresponding apidoc_defn line, if one exists, or the
Expand Down Expand Up @@ -713,6 +713,13 @@
: tools, such as Devel::PPPort, that this requires special handling.
:
: 'U' autodoc.pl will not output a usage example
:
: 'v' The element is some sort of value that isn't any of the other types in
: this file. For example, it could be an enumeration constant; that is,
: it is one of the members of the list of constants a variable declared
: to be a particular enum can have. These are always visible to XS code
: unless guarded by preprocessor directives, Also implies 'n'.

:
: 'W' Add a comma_pDEPTH argument to function prototypes, and a comma_aDEPTH
: argument to the function calls. This means that under DEBUGGING a
Expand Down
2 changes: 1 addition & 1 deletion pod/perlreapi.pod
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ is defined as per L<isSPACE|perlapi/isSPACE>, and by the internal
macros C<is_utf8_space> under UTF-8, and C<isSPACE_LC> under C<use
locale>.

=for apidoc Amnh||REGEX_LOCALE_CHARSET
=for apidoc Avnh||REGEX_LOCALE_CHARSET

=back

Expand Down
4 changes: 3 additions & 1 deletion regen/embed.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3655,7 +3655,9 @@ sub generate_proto_h {

my ($flags, $retval, $plain_func, $args, $assertions ) =
@{$embed}{qw(flags return_type name args assertions)};
if ($flags =~ / ( [^ AabCDdEefFhIiMmNnOoPpRrSsTUuWXx;] ) /xx) {
if ($flags =~
m/([^ aA b C dD eE fF h iI mM nN oO pP Rr sS T uU v W xX ; ])/xx)
{
die_at_end "flag $1 is not legal (for function $plain_func)";
}

Expand Down
Loading