Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perlapi: Combine all sv_catpv() forms into one group #22373

Open
wants to merge 4 commits into
base: blead
Choose a base branch
from

Conversation

khwilliamson
Copy link
Contributor

This also changes the formal parameter name of some of the macros so
that all forms in the group have consistent parameter names.

With this commit, it is now possible to have continuation lines on
apidoc lines in the source
The function it merely wraps is const
These are macros, so the const has no compilation effect, but the
function the macros expand to does have a const, so make them match.
@jkeenan
Copy link
Contributor

jkeenan commented Jul 3, 2024

For consistency with all your other "Combine API entries" pull requests, I believe that the changes to autodoc.pl itself (de6c30e) should go into a separate pull request.

This also changes the formal parameter name of some of the macros so
that all forms in the group have consistent parameter names.
@jkeenan
Copy link
Contributor

jkeenan commented Jul 3, 2024

The Subject line for this p.r. is slightly misleading. Last month, in this commit:

commit ee4e4f68dd9b1c3924f0750b92245e6855f12778
Author:     Karl Williamson <[email protected]>
AuthorDate: Mon Jun 10 10:37:02 2024 -0600
Commit:     Karl Williamson <[email protected]>
CommitDate: Wed Jun 12 14:45:11 2024 -0600

    perlapi: Combine sv_catpvf-type functions into one group

... you grouped these API functions together:

    "sv_catpvf"
    "sv_catpvf_nocontext"
    "sv_catpvf_mg"
    "sv_catpvf_mg_nocontext"
    "sv_vcatpvf"
    "sv_vcatpvf_mg"
    "sv_vcatpvfn"
    "sv_vcatpvfn_flags"

Can you briefly note why they should not go into the section discussed in this pull request? (I concede that that would make this section very large.)

# Count lines easier
my $get_next_line = sub { $line_num++; return <$fh> };
# Count lines easier and handle apidoc continuation lines
my $get_next_line = sub { my $contents = <$fh>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we wrap this after the { and indent the sub body the normal amount instead of half a screen?

/$1/x)
{
my $next = <$fh>;
last unless defined $next;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a no warnings 'exiting';

@tonycoz
Copy link
Contributor

tonycoz commented Jul 4, 2024

Can you briefly note why they should not go into the section discussed in this pull request? (I concede that that would make this section very large.)

They do different things.

The functions described here are like $x .= "somestring"; or $x .= $y;

The pvf functions concatenate a formatted string, so like $x .= sprintf($format, $arg, ...); with all the complexity of the format string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants