Skip to content

Conversation

khwilliamson
Copy link
Contributor

And make a few small autodoc.pl improvements that are needed to support this

  • This set of changes does not require a perldelta entry.

# endif

/*
=for apidoc Cm||INIT|const_expr

Choose a reason for hiding this comment

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

Commit Document things in EXTERN.h, INTERN.h

Wondering if this can/should contain an explanation of when one should use this.
(But maybe there is a better place for it?)

When documenting something like DOINIT which is either #defined or not,
it will never have an argument, so automatically include that without
the user having to specify it.
For example, the "CV Handling" section in perlintern did not include the
introduction for it that appears in perlapi; just the elements.  It is
more convenient for the reader to have that short summary in this pod as
well.
There are lots of empty sections in perlintern, but until this commit it
was assumed that all sections would have something in perlapi.  This
allows the user to specify that particular sections may not have perlapi
entries.
@khwilliamson
Copy link
Contributor Author

extensively revised

Use them like this:
#include "perl.h"

Choose a reason for hiding this comment

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

Can you double check this is correct?
Just looking around I can't immediately see how including perl.h would cause INTERN.h/EXTERN.h to be included..

And looking at some files, av.c for example contains:

#include "EXTERN.h"
#define PERL_IN_AV_C
#include "perl.h"

So it's loading both EXTERN.h and perl.h but if that is the "right" way to do it then I don't see how including onliny perl.h in the example works?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about now?

INTERN.h Outdated
Comment on lines 33 to 34
Use C<EXT> and C<EXTCONST> for variables which will become defined by
#including F<perl.h>.

Choose a reason for hiding this comment

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

This also looks a bit conflicting since the example starts with an #include "perl.h" and then uses EXTCONST?
(Should EXT/EXTCONST with INIT ever be used outside of perl.h?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about now?

@khwilliamson khwilliamson merged commit f91ad03 into Perl:blead Sep 28, 2025
33 checks passed
@khwilliamson khwilliamson deleted the EXTERN_api branch September 28, 2025 17:15
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.

3 participants