Skip to content

Commit

Permalink
Note that certain flags are documented
Browse files Browse the repository at this point in the history
This is useful in Devel::PPPort for generating its api-info data.  That
useful feature of D:P allows someone to find out what was the first
release of Perl to have a function, macro, or flag.  And whether using
ppport.h backports it further.

I went through apidoc.pod and looked for flags that were documented but
that D:P didn't know about.  This commit adds entries for each so that
D:P can find them.
  • Loading branch information
khwilliamson committed Dec 17, 2019
1 parent 81d1145 commit 5af38e4
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cop.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ it has not been precomputed. Returns a mortal scalar copy of the value
associated with the key, or C<&PL_sv_placeholder> if there is no value
associated with the key.
=for apidoc Amnh||COPHH_KEY_UTF8
=cut
*/

Expand Down
7 changes: 7 additions & 0 deletions gv.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ the return value of SvUTF8(sv). It can also take the
C<GV_ADDMULTI> flag, which means to pretend that the GV has been
seen before (i.e., suppress "Used once" warnings).
=for apidoc Amnh||GV_ADDMULTI
=for apidoc gv_init
The old form of C<gv_init_pvn()>. It does not work with UTF-8 strings, as it
Expand Down Expand Up @@ -1462,6 +1464,11 @@ Note, use of C<gv_stashsv> instead of C<gv_stashpvn> where possible is strongly
recommended for performance reasons.
=for apidoc Amnh||GV_ADD
=for apidoc Amnh||GV_NOADD_NOINIT
=for apidoc Amnh||GV_NOINIT
=for apidoc Amnh||GV_NOEXPAND
=for apidoc Amnh||GV_ADDMG
=for apidoc Amnh||SVf_UTF8
=cut
*/
Expand Down
2 changes: 2 additions & 0 deletions hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2672,6 +2672,8 @@ C<&PL_sv_placeholder>. Note that the implementation of placeholders and
restricted hashes may change, and the implementation currently is
insufficiently abstracted for any change to be tidy.
=for apidoc Amnh||HV_ITERNEXT_WANTPLACEHOLDERS
=cut
*/

Expand Down
5 changes: 5 additions & 0 deletions intrpvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ Set by the L<perlfunc/exit> operator.
=back
=for apidoc Amnh||PERL_EXIT_EXPECTED
=for apidoc Amnh||PERL_EXIT_ABORT
=for apidoc Amnh||PERL_EXIT_DESTRUCT_END
=for apidoc Amnh||PERL_EXIT_WARN
=cut
*/

Expand Down
13 changes: 13 additions & 0 deletions op.c
Original file line number Diff line number Diff line change
Expand Up @@ -6506,6 +6506,8 @@ is automatically set. C<first> supplies an optional op to be the direct
child of the unary op; it is consumed by this function and become part
of the constructed op tree.

=for apidoc Amnh||OPf_KIDS

=cut
*/

Expand Down Expand Up @@ -8714,6 +8716,10 @@ decremented. In addition, the C<name> argument is modified.
If C<PERL_LOADMOD_DENY> is set, the module is loaded as if with C<no> rather
than C<use>.

=for apidoc Amnh||PERL_LOADMOD_DENY
=for apidoc Amnh||PERL_LOADMOD_NOIMPORT
=for apidoc Amnh||PERL_LOADMOD_IMPORT_OPS

=cut */

void
Expand Down Expand Up @@ -14150,6 +14156,11 @@ referencing GV. The resulting C<GV*> is cast to C<CV*> to be returned.
A null pointer is returned as usual if there is no statically-determinable
subroutine.

=for apidoc Amnh||OPpEARLY_CV
=for apidoc Amnh||OPpENTERSUB_AMPER
=for apidoc Amnh||RV2CVOPCV_MARK_EARLY
=for apidoc Amnh||RV2CVOPCV_RETURN_NAME_GV

=cut
*/

Expand Down Expand Up @@ -14726,6 +14737,8 @@ C<gflags> is a bitset passed into C<cv_get_call_checker_flags>, in which
only the C<CALL_CHECKER_REQUIRE_GV> bit currently has a defined meaning
(for which see above). All other bits should be clear.

=for apidoc Amnh||CALL_CHECKER_REQUIRE_GV

=for apidoc cv_get_call_checker

The original form of L</cv_get_call_checker_flags>, which does not return
Expand Down
6 changes: 6 additions & 0 deletions pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ to be generated in evals, such as
For state vars, C<SVs_PADSTALE> is overloaded to mean 'not yet initialised',
but this internal state is stored in a separate pad entry.
=for apidoc Amnh||SVs_PADSTALE
=for apidoc AmnxU|PADNAMELIST *|PL_comppad_name
During compilation, this points to the array containing the names part
Expand Down Expand Up @@ -2265,6 +2267,8 @@ If C<flags> has the C<CV_NAME_NOTQUAL> bit set, then the package name will not b
included. If the first argument is neither a CV nor a GV, this flag is
ignored (subject to change).
=for apidoc Amnh||CV_NAME_NOTQUAL
=cut
*/

Expand Down Expand Up @@ -2750,6 +2754,8 @@ that refer to outer lexicals. (See also L</newPADNAMEpvn>.) C<outer> is
the outer pad name that this one mirrors. The returned pad name has the
C<PADNAMEt_OUTER> flag already set.
=for apidoc Amnh||PADNAMEt_OUTER
=cut
*/

Expand Down
4 changes: 4 additions & 0 deletions sv.c
Original file line number Diff line number Diff line change
Expand Up @@ -5489,6 +5489,10 @@ C<mg_set> on C<dsv> afterwards if appropriate.
C<sv_catpvn> and C<sv_catpvn_nomg> are implemented
in terms of this function.
=for apidoc Amnh||SV_CATUTF8
=for apidoc Amnh||SV_CATBYTES
=for apidoc Amnh||SV_SMAGIC
=cut
*/

Expand Down
7 changes: 7 additions & 0 deletions toke.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,8 @@ buffer is currently being interpreted (L</lex_bufutf8>). If a string
to be inserted is available as a Perl scalar, the L</lex_stuff_sv>
function is more convenient.
=for apidoc Amnh||LEX_STUFF_UTF8
=cut
*/

Expand Down Expand Up @@ -1296,6 +1298,8 @@ consumed, then it will not be discarded regardless of the flag.
Returns true if some new text was added to the buffer, or false if the
buffer has reached the end of the input text.
=for apidoc Amnh||LEX_KEEP_PREVIOUS
=cut
*/

Expand Down Expand Up @@ -12715,7 +12719,10 @@ normally resulting in a single exception at the top level of parsing
which covers all the compilation errors that occurred. Some compilation
errors, however, will throw an exception immediately.
=for apidoc Amnh||PARSE_OPTIONAL
=cut
*/

OP *
Expand Down
14 changes: 14 additions & 0 deletions utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,20 @@ All other code points corresponding to Unicode characters, including private
use and those yet to be assigned, are never considered malformed and never
warn.
=for apidoc Amnh||UTF8_CHECK_ONLY
=for apidoc Amnh||UTF8_DISALLOW_ILLEGAL_INTERCHANGE
=for apidoc Amnh||UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE
=for apidoc Amnh||UTF8_DISALLOW_SURROGATE
=for apidoc Amnh||UTF8_DISALLOW_NONCHAR
=for apidoc Amnh||UTF8_DISALLOW_SUPER
=for apidoc Amnh||UTF8_WARN_ILLEGAL_INTERCHANGE
=for apidoc Amnh||UTF8_WARN_ILLEGAL_C9_INTERCHANGE
=for apidoc Amnh||UTF8_WARN_SURROGATE
=for apidoc Amnh||UTF8_WARN_NONCHAR
=for apidoc Amnh||UTF8_WARN_SUPER
=for apidoc Amnh||UTF8_WARN_PERL_EXTENDED
=for apidoc Amnh||UTF8_DISALLOW_PERL_EXTENDED
=cut
Also implemented as a macro in utf8.h
Expand Down

0 comments on commit 5af38e4

Please sign in to comment.