Skip to content

Commit 3fcf96f

Browse files
committed
autodoc: Include embed.fnc line number in output comments
The generated perlapi and perlintern will now include in their comments the position in embed.fn that the signature was found. This makes finding things a bit easier.
1 parent ff7aa41 commit 3fcf96f

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

autodoc.pl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,13 +2513,9 @@ ($destpod)
25132513
my $embed= $_->{embed}
25142514
or next;
25152515
my $file = $_->{source};
2516-
my ($flags, $ret_type, $func, $args) =
2517-
@{$embed}{qw(flags return_type name args)};
2518-
check_and_add_proto_defn($func, $file,
2519-
# embed.fnc data doesn't currently furnish the
2520-
# line number
2521-
undef,
2522-
2516+
my ($flags, $ret_type, $func, $args, $line_num) =
2517+
@{$embed}{qw(flags return_type name args start_line_num)};
2518+
check_and_add_proto_defn($func, $file, $line_num,
25232519
$flags, $ret_type, $args,
25242520

25252521
# This is like an 'apidoc_defn' line, in that it

regen/HeaderParser.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,10 +790,10 @@ sub tidy_embed_fnc_entry {
790790
($line)= unexpand($line);
791791

792792
$line_data->{embed}= EmbedLine->new(
793-
flags => $flags,
794-
return_type => $ret,
795-
name => $name,
796-
args => \@args,
793+
flags => $flags,
794+
return_type => $ret,
795+
name => $name,
796+
args => \@args,
797797
start_line_num => $line_data->{start_line_num},
798798
);
799799
$line =~ s/\s+\z/\n/;

0 commit comments

Comments
 (0)