This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
4 years ago[MERGE] add+use PL_curstackinfo->si_cxsubix field
David Mitchell [Thu, 19 Sep 2019 09:48:52 +0000 (10:48 +0100)]
[MERGE] add+use PL_curstackinfo->si_cxsubix field

Makes determining context at runtime faster (e.g. last statement in a
sub).

4 years agoperldelta for PL_curstackinfo->si_cxsubix
David Mitchell [Thu, 19 Sep 2019 09:22:25 +0000 (10:22 +0100)]
perldelta for PL_curstackinfo->si_cxsubix

4 years agoPerl_gimme_V(): assume caller always provides cxt
David Mitchell [Wed, 18 Sep 2019 12:43:12 +0000 (13:43 +0100)]
Perl_gimme_V(): assume caller always provides cxt

So we don't need to check whether (cxstack[cxix].blk_gimme & G_WANT),
just use it. Replace the check with an assertion.

4 years agoadd Perl_gimme_V() static inline fn for GIMME_V
David Mitchell [Tue, 17 Sep 2019 14:28:51 +0000 (15:28 +0100)]
add Perl_gimme_V() static inline fn for GIMME_V

This function makes use of PL_curstackinfo->si_cxsubix to avoid the
overhead of a call to block_gimme() when the context of the op is
unknown.

4 years agoadd PL_curstackinfo->si_cxsubix field
David Mitchell [Tue, 17 Sep 2019 13:20:40 +0000 (14:20 +0100)]
add PL_curstackinfo->si_cxsubix field

This tracks the most recent sub/eval/format context pushed onto the
context stack. Then make dopopto_cursub use it.

The previous value is saved in the cxt struct, and is restored whenever
the context is popped.

This adds a tiny overhead for every sub call, but speeds up other
operations, such as determining the caller context when returning a
value from a sub - this has to be dpne for every sub call where the last
expression is context sensitive, so its often a win.

4 years agoadd dopopto_cursub() macro to pp_ctl.c
David Mitchell [Tue, 17 Sep 2019 13:25:39 +0000 (14:25 +0100)]
add dopopto_cursub() macro to pp_ctl.c

short for dopoptosub(cxstack_ix), a common idiom in that file.

4 years agoset VOID on OP_ENTER
David Mitchell [Wed, 18 Sep 2019 11:28:18 +0000 (12:28 +0100)]
set VOID on OP_ENTER

The OP_ENTER planted at the start of a program (and possibly elsewhere)
gets left as UNKNOWN context rather than VOID context, due to op_scope()
not honouring the current context.

Fixing this makes things infinitesimally faster.

4 years agoVanL is now a perl author
Tony Cook [Thu, 19 Sep 2019 05:11:53 +0000 (15:11 +1000)]
VanL is now a perl author

4 years agoupdate perl5-porters list information
VanL [Thu, 19 Sep 2019 04:59:39 +0000 (14:59 +1000)]
update perl5-porters list information

4 years agoperldelta: Add note that documentation has been added to perlapi,perlintern
Karl Williamson [Tue, 17 Sep 2019 00:08:45 +0000 (18:08 -0600)]
perldelta: Add note that documentation has been added to perlapi,perlintern

4 years agoAdd check for malloc_usable_size (Richard Leach)
H.Merijn Brand [Mon, 16 Sep 2019 06:04:37 +0000 (08:04 +0200)]
Add check for malloc_usable_size (Richard Leach)

4 years agoperldelta for 2cb5a7e8af11
Tony Cook [Mon, 16 Sep 2019 01:10:57 +0000 (11:10 +1000)]
perldelta for 2cb5a7e8af11

4 years ago(perl #125557) correctly handle overload for bin/oct floats
Tony Cook [Wed, 11 Sep 2019 01:50:23 +0000 (11:50 +1000)]
(perl #125557) correctly handle overload for bin/oct floats

The hexfp code doesn't check that the shift is 4, and so also
accepts binary and octal fp numbers.

Unfortunately the call to S_new_constant() always passed a prefix
of 0x, so overloading would be trying to parse the wrong number.

Another option is to simply allow only hex floats, though some work
was done in 131894 to improve oct/bin float support.

4 years agoregcomp.sym: Fix comment
Karl Williamson [Sun, 15 Sep 2019 22:08:13 +0000 (16:08 -0600)]
regcomp.sym: Fix comment

The length of an EXACTish node is the same bits as the FLAGS field in
other nodes; it doesn't "precede the length", as previously claimed.

4 years agoMerge branch 'embed.fnc' into blead
Karl Williamson [Sun, 15 Sep 2019 16:40:29 +0000 (10:40 -0600)]
Merge branch 'embed.fnc' into blead

This series of commits slightly improves XS code name space pollution
from the core, and better documents what is happening.

It adds a new C flag to embed.fnc which doesn't change the pollution
problem, but makes it easier for downstream tools, like Devel::PPPort.

Some of the inline.h functions didn't even have prefixes, contrary to
our policy of having functions visible outside the core have a 'Perl_'
prefix.

The branch also documents a couple of API functions and macros.

And better error checking of embed.fnc entries is now done.

4 years agoregen/embed.pl: Enforce some flag restrictions
Karl Williamson [Sat, 14 Sep 2019 20:34:23 +0000 (14:34 -0600)]
regen/embed.pl: Enforce some flag restrictions

embed.fnc now has been updated to not have these flaws, so can now
enforce them for the future.

4 years agoregen/embed.pl: Update a branch test
Karl Williamson [Sat, 14 Sep 2019 20:33:16 +0000 (14:33 -0600)]
regen/embed.pl: Update a branch test

The two flags are now mutually exclusive, so no need to test for both.

4 years agoembed.fnc: M and o flags don't make sense together
Karl Williamson [Sat, 14 Sep 2019 20:30:18 +0000 (14:30 -0600)]
embed.fnc: M and o flags don't make sense together

The M flag does what the o flag except add an incorrect warning.  So
remove the 'o' which gets rid of the warning.

4 years agoembed.fnc: 'm' and 'p' flags don't make sense together
Karl Williamson [Sat, 14 Sep 2019 20:26:05 +0000 (14:26 -0600)]
embed.fnc: 'm' and 'p' flags don't make sense together

This is a macro, so doesn't have a Perl_ long form function call.
Also forbid 'm' and 'S', but there weren't any current uses of that.

4 years agoperlapi: Properly document Perl_custom_op_xop()
Karl Williamson [Sat, 14 Sep 2019 20:16:19 +0000 (14:16 -0600)]
perlapi: Properly document Perl_custom_op_xop()

It requires the prefix and a thread context parameter.

4 years agoautodoc.pl: Special case macros whose name begins with Perl_
Karl Williamson [Sat, 14 Sep 2019 20:11:47 +0000 (14:11 -0600)]
autodoc.pl: Special case macros whose name begins with Perl_

The usage example for these will have the thread context parameter
unless there is no thread context.

4 years agoembed.fnc: Add some comment about name space pollution
Karl Williamson [Sat, 14 Sep 2019 20:06:51 +0000 (14:06 -0600)]
embed.fnc: Add some comment about name space pollution

4 years agoembed.fnc: E, X flags don't make sense with m
Karl Williamson [Thu, 12 Sep 2019 20:31:47 +0000 (14:31 -0600)]
embed.fnc: E, X flags don't make sense with m

Macros can't currently be restricted in scope.

4 years agoDocument IS_SAFE_SYSCALL
Karl Williamson [Thu, 12 Sep 2019 20:24:48 +0000 (14:24 -0600)]
Document IS_SAFE_SYSCALL

4 years agoperlapi: Improve description of is_safe_syscall()
Karl Williamson [Thu, 12 Sep 2019 20:23:18 +0000 (14:23 -0600)]
perlapi: Improve description of is_safe_syscall()

Two parameters weren't described, nor the warnings category used.

4 years agoembed.fnc: Add p flag for is_utf8_non_invariant_string()
Karl Williamson [Thu, 12 Sep 2019 04:08:24 +0000 (22:08 -0600)]
embed.fnc: Add p flag for is_utf8_non_invariant_string()

This is because it has the X flag, which means the function is visible
on ELF systems.

4 years agoAdd embed.fnc entry for ReANY
Karl Williamson [Thu, 12 Sep 2019 02:33:05 +0000 (20:33 -0600)]
Add embed.fnc entry for ReANY

This inline function should have an entry.

4 years agoAdd embed.fnc entries for TOPMARK, POPMARK
Karl Williamson [Thu, 12 Sep 2019 00:18:33 +0000 (18:18 -0600)]
Add embed.fnc entries for TOPMARK, POPMARK

4 years agoAdd Perl_ to SvAMAGIC _off,_on names
Karl Williamson [Wed, 11 Sep 2019 23:37:23 +0000 (17:37 -0600)]
Add Perl_ to SvAMAGIC _off,_on names

These function names need a Perl_ prefix to avoid namespace pollution.

4 years agoAdd embed.fnc entries for Cv inline fcns
Karl Williamson [Wed, 11 Sep 2019 23:24:38 +0000 (17:24 -0600)]
Add embed.fnc entries for Cv inline fcns

and change the name of one.  CvDEPTH shouldn't have a trailing 'p' to
indicate private memeber access.  It may do so internally, but the name
shouldn't indicate that.

4 years agoFix up get_regex_charset_name()
Karl Williamson [Wed, 11 Sep 2019 23:08:25 +0000 (17:08 -0600)]
Fix up get_regex_charset_name()

This inline function should not be visible outside certain core (and
ext/re) functions.  Make that happen.

4 years agoinline.h: Move some fcn '{' to column 1
Karl Williamson [Wed, 11 Sep 2019 23:03:29 +0000 (17:03 -0600)]
inline.h: Move some fcn '{' to column 1

Traditionally, functions in perl have been written so their initial '{'
is in column 1 after the prototype.  This makes grepping easier.  This
commit brings 3 functions in this file into conformance.

4 years agoMake PadnameIN_SCOPE() name begin with S_
Karl Williamson [Wed, 11 Sep 2019 21:56:11 +0000 (15:56 -0600)]
Make PadnameIN_SCOPE() name begin with S_

All functions should have a prefix.

4 years agoSome SvREFCNT_foo are no longer macros
Karl Williamson [Tue, 10 Sep 2019 18:37:28 +0000 (12:37 -0600)]
Some SvREFCNT_foo are no longer macros

but are inline functions.  They should be listed in embed.fnc.

4 years agoStrip leading underscore _variant_byte_number()
Karl Williamson [Tue, 10 Sep 2019 17:51:40 +0000 (11:51 -0600)]
Strip leading underscore _variant_byte_number()

Names with leading underscores are reserved for the C implementers.

4 years agoChange name of _utf8_to_uvchr_buf()
Karl Williamson [Tue, 10 Sep 2019 17:12:59 +0000 (11:12 -0600)]
Change name of _utf8_to_uvchr_buf()

A function name with a leading underscore is not legal in C.  Instead
add a suffix to differentiate this name from an otherwise identical one.

4 years agoStrip leading underscore from is_utf8_char_helper()
Karl Williamson [Tue, 10 Sep 2019 16:59:04 +0000 (10:59 -0600)]
Strip leading underscore from is_utf8_char_helper()

Leading underscored name are reserved for the C implementers

4 years agoinline.h: Change fcn name prefix from S_ to Perl_
Karl Williamson [Wed, 11 Sep 2019 21:20:45 +0000 (15:20 -0600)]
inline.h: Change fcn name prefix from S_ to Perl_

This is being done only for those functions that don't have a guard
preventing them from being seen outside of the Perl core.

Talking to Tony Cook, we agreed that this was a good idea for two
reasons:

1) The 'Perl_' prefix does not pollute XS caller's name space.  The 'S_'
   one could be argued that it doesn't much either, but it does more so
   than 'Perl_', and the next reason is the clincher:
2) It allows us to change our minds about whether a function should be
   static inline or not, without affecting callers who use the Perl_
   form, which they would be accustomed to anyway if they're using the
   full name form.

4 years agoregen/embed.pl: Generally generate an ARGS_ASSERT
Karl Williamson [Mon, 9 Sep 2019 17:53:55 +0000 (11:53 -0600)]
regen/embed.pl: Generally generate an ARGS_ASSERT

Prior to this commit, if you changed a pointer argument to allow it
being a NULL, you had to go in and also remove the function's
PERL_ARGS_ASSERT macro call.  Now, such macros are generally defined
even if they are empty, so you can add such a call to any function, and
it will always compile.  If there is no assertion needed, the macro
expands to nothing.

Thus now, the use of these macros is optional when no assert is needed;
but still required by the porting test args_assert.t when an assert is
needed.

The generation of such a macro (when its use is optional) can be
suppressed for individual entries by the new G flag in embed.fnc, also
added by this commit.

4 years agoregen/embed.pl: Wrap #if..#endif differently
Karl Williamson [Mon, 9 Sep 2019 17:43:18 +0000 (11:43 -0600)]
regen/embed.pl: Wrap #if..#endif differently

By surrounding the interior stuff with these in one statement, it makes
it easier to change that interior stuff without having dangling
statements.

This makes no difference in the current generated output

4 years agoembed.fnc: Mark atof2, atof3 for internal use only
Karl Williamson [Sun, 1 Sep 2019 02:58:57 +0000 (20:58 -0600)]
embed.fnc: Mark atof2, atof3 for internal use only

Now that we have Strtod, my_strtod, those should be used instead.

4 years agosv.h: SVt_INVLIST is core-only
Karl Williamson [Sun, 21 Jul 2019 20:02:31 +0000 (14:02 -0600)]
sv.h: SVt_INVLIST is core-only

4 years agoembed.fnc: Change some 'x' marked fcns to 'C'
Karl Williamson [Fri, 9 Aug 2019 17:41:07 +0000 (11:41 -0600)]
embed.fnc: Change some 'x' marked fcns to 'C'

The previous commit added the C flag, which is better to use in many
instances than x.  This commit changes the x entries in embed.fnc that
I'm pretty sure would be better off being C, and removes some 'x'
entries for internal only functions

4 years agoAdd 'C' flag to embed.fnc, for "core-only" fcns
Karl Williamson [Sun, 21 Jul 2019 19:20:55 +0000 (13:20 -0600)]
Add 'C' flag to embed.fnc, for "core-only" fcns

Previously the x flag was (mis-)used for this purpose.  Some functions
that are accessible by XS writers shouldn't be used by them, such as
helper functions that an inline public function calls.  This new flag
alows that to be specified, without having to mark the function as
experimental, which could be misleading to later core maintainers

4 years agoembed.fnc: Clarify comments, and note 'u' flag exceptions
Karl Williamson [Sat, 31 Aug 2019 20:30:29 +0000 (14:30 -0600)]
embed.fnc: Clarify comments, and note 'u' flag exceptions

The next release of Devel::PPPort will know how to handle all these
unorthodox functions, so no need to declare them as such, and in fact
they shouldn't be declared so.

4 years agomathoms.c: Add comment
Karl Williamson [Wed, 11 Sep 2019 23:17:18 +0000 (17:17 -0600)]
mathoms.c: Add comment

4 years agot/re/anyof.t: Fix test names
Karl Williamson [Fri, 13 Sep 2019 02:56:59 +0000 (20:56 -0600)]
t/re/anyof.t: Fix test names

This previously duplicated some boiler plate in the test name

4 years agoregcomp.c: Fix -Dr bug
Karl Williamson [Sun, 26 May 2019 18:22:26 +0000 (12:22 -0600)]
regcomp.c: Fix -Dr bug

If dumping the program and a single range crosses the border between
being in the bitmap and not, the range must be split at the border
because the output has separate text for things in the bitmap vs. those
not.

I'm not sure that there is a situation where this currently occurs, but
it will so with a future commit

4 years agoregcomp.c: Collapse some code
Karl Williamson [Sun, 31 Mar 2019 20:13:58 +0000 (14:13 -0600)]
regcomp.c: Collapse some code

These case statements are all repeated in the code for bracketed
character classes, and mean the same thing.  That code knows a bunch of
things for optimizing.  No need to duplicate that.  Instead, pretend
these are being called within brackets, and call the code to handle
that case, which will generate the proper ops.  This now follows the
example of Unicode properties which have long been processed by
pretending they are surrounded by [...]

4 years agoGeneralize inRANGE()
Karl Williamson [Wed, 26 Jun 2019 18:23:47 +0000 (12:23 -0600)]
Generalize inRANGE()

I figured out a way to make this work generally.  I've also tested this
vs what some modern compilers do under -O2.  It seems this macro is
slightly better.

4 years agoAdd withinCOUNT() macro and change inRANGE to use it
Karl Williamson [Wed, 26 Jun 2019 18:01:05 +0000 (12:01 -0600)]
Add withinCOUNT() macro and change inRANGE to use it

This uses just one conditional to see if a value is between low and
(low + n).

4 years agoperl.h: Fix typo in comment
Karl Williamson [Sun, 15 Sep 2019 04:18:13 +0000 (22:18 -0600)]
perl.h: Fix typo in comment

4 years agoAvoid panic when last s///g is tainted and utf8
David Mitchell [Sat, 14 Sep 2019 15:18:46 +0000 (16:18 +0100)]
Avoid panic when last s///g is tainted and utf8

RT #134409

In a repeated substitution, where the replacement is an expression,
and when the last replacement value is both tainted and utf8, and
everything earlier has been plain, and the final string is suitably
shorter than the original, a panic resulted:

    sv_pos_b2u: bad byte offset, blen=1, byte=6

This is because when at the end, taint magic is being being added to
the target of the s///, the target SV has already had its buffer updated
with the shorter result string, but still has the pos() magic set which
corresponded to the original longer string (this pos value would, in the
normal flow of things, be reset shortly afterwards).

One quirk of sv_magic(), which adds any sort of magic including taint
magic, is that it always checks for the presence of pos() magic, and if
so, converts the byte to utf8 offset if necessary. This was seeing the
invalid pos() offset and panicing.

The check was added by v5.19.3-111-g25fdce4a16:
    "Stop pos() from being confused by changing utf8ness"
It seems like a bit of hack to recalibrate pos() each time sv_magic()
is called, but I've left that alone (sleeping dogs and all that) and
instead added a hack in the taint code path in pp_substcont to reset pos
before setting taint.

4 years agoperldelta for 1e1b6d926a0c8361bc2ebd2b6630ac97988335e3
James E Keenan [Fri, 13 Sep 2019 18:12:54 +0000 (14:12 -0400)]
perldelta for 1e1b6d926a0c8361bc2ebd2b6630ac97988335e3

4 years agoperldelta for 00ea29f1a18d6cb17456df2e33f105a90ddc8c3a
James E Keenan [Fri, 13 Sep 2019 17:32:33 +0000 (13:32 -0400)]
perldelta for 00ea29f1a18d6cb17456df2e33f105a90ddc8c3a

4 years agoUpdate Test-Simple to CPAN version 1.302168
Chad Granum [Fri, 13 Sep 2019 17:27:41 +0000 (13:27 -0400)]
Update Test-Simple to CPAN version 1.302168

1.302168  2019-09-06 07:40:18-07:00 America/Los_Angeles

    - Fix Typo in a Test2::API::Breakage warning (Thanks E. Choroba)
    - Delay loading of Term::Table until needed (Thanks Graham Knop)

1.302167  2019-08-23 14:07:58-07:00 America/Los_Angeles

    - add test2_is_testing_done api method
    - Fix string compare warning

4 years agoUpdate Scalar-List-Utils from 1.50 to 1.52
Max Maischein [Fri, 13 Sep 2019 07:21:35 +0000 (09:21 +0200)]
Update Scalar-List-Utils from 1.50 to 1.52

This updates the following modules from 1.50 to 1.52:

List::Util
List::Util::XS
Scalar::Util
Sub::Util

4 years agoUpdate Module-Metadata to CPAN version 1.000037
Chris 'BinGOs' Williams [Fri, 13 Sep 2019 13:23:36 +0000 (14:23 +0100)]
Update Module-Metadata to CPAN version 1.000037

  [DELTA]

1.000037  2019-09-07 18:32:44Z
  - add decode_pod option for automatic =encoding handling

4 years agoUpdate ExtUtils-MakeMaker to CPAN version 7.38
Chris 'BinGOs' Williams [Fri, 13 Sep 2019 12:30:12 +0000 (13:30 +0100)]
Update ExtUtils-MakeMaker to CPAN version 7.38

  [DELTA]

7.38 Wed 11 Sep 10:01:46 BST 2019

    No changes since v7.37_04

7.37_04 Thu 22 Aug 15:20:34 BST 2019

    Bug fixes:
    - Fix static linking on macOS

7.37_03 Sat Aug  3 12:37:29 BST 2019

    Enhancements:
    - Improved mandoc section detection

7.37_02 Thu Jun 27 11:10:39 BST 2019

    Test fixes:
    - Fix test failures in 02-xsdynamic.t on Android native builds
      Github issue #337

7.37_01 Fri Jun  7 11:21:39 BST 2019

    Test fixes:
    - [rt.cpan.org #129763] fixed test errors with latest Pod::Simple

4 years agoPATCH: [perl #134405] Compiler warnings in blead
Karl Williamson [Wed, 11 Sep 2019 22:22:15 +0000 (16:22 -0600)]
PATCH: [perl #134405] Compiler warnings in blead

This was caused by functions that should have been deprecated all along,
and now are.  But they are still called in places.  In most instances
one deprecated function is a wrapper for another.  In one instance, the
calling of the function is to just make sure that mathoms.o gets linked
to.

The solution adopted here, some of which was suggested by Tony Cook, is
to use #pragmas to silence the warnings.  By doing this around the
entirety of mathoms.c, future issues will most likely be avoided.  And
there are unlikely to enough future cases outside of mathoms to cause a
problem.

4 years agoFlorian Weimer is now a perl author
Tony Cook [Tue, 10 Sep 2019 00:44:10 +0000 (10:44 +1000)]
Florian Weimer is now a perl author

4 years agoConfigure: Include <stdlib.h> in futimes check
Florian Weimer [Mon, 9 Sep 2019 17:35:47 +0000 (19:35 +0200)]
Configure: Include <stdlib.h> in futimes check

Needed for the exit function.

4 years agoREADME.cn: Fix pod errors
Karl Williamson [Mon, 9 Sep 2019 16:53:00 +0000 (10:53 -0600)]
README.cn: Fix pod errors

These were introduced in 4d714158728b57246e7015b4f913802c7445a80a

4 years agoMerge branch 'pull/22' into blead (from https://github.com/Perl/perl5/pull/22)
Karen Etheridge [Mon, 9 Sep 2019 05:46:17 +0000 (22:46 -0700)]
Merge branch 'pull/22' into blead (from https://github.com/Perl/perl5/pull/22)

4 years agoReplace a few http urls with https
Kang-min Liu [Sun, 1 Sep 2019 06:24:43 +0000 (15:24 +0900)]
Replace a few http urls with https

A few link labels are also updated.

4 years agoRevise URLs in README.ko
Kang-min Liu [Sun, 1 Sep 2019 06:10:03 +0000 (15:10 +0900)]
Revise URLs in README.ko

1. Remove a dead link
2. Replace http urls with https, when available.

4 years agoRevise the URLs un READEM.cn and README.tw
Kang-min Liu [Sun, 1 Sep 2019 06:01:14 +0000 (15:01 +0900)]
Revise the URLs un READEM.cn and README.tw

- link "the homepage" to www.perl.org instead of perl.com
- modify the description of www.perl.com to stop mentioning O'Reilly.
- replace a few urls with https://

4 years agoPrefer https for a few important urls.
Kang-min Liu [Sun, 1 Sep 2019 05:46:31 +0000 (14:46 +0900)]
Prefer https for a few important urls.

Since browsers are marking "http" as "insecure", it's generally
looking good to link to a https URL when possible.

Also, since www.perl.com is no longer operated by O'Reilly. It is probably
better to remove the name of O'Reilly from the link label.

4 years agoRemove a dead link and its label.
Kang-min Liu [Fri, 30 Aug 2019 13:51:57 +0000 (22:51 +0900)]
Remove a dead link and its label.

4 years agoprefer https URLs.
Kang-min Liu [Fri, 30 Aug 2019 01:47:25 +0000 (10:47 +0900)]
prefer https URLs.

4 years agobump $Time::HiRes::VERSION
Tony Cook [Mon, 9 Sep 2019 01:14:05 +0000 (11:14 +1000)]
bump $Time::HiRes::VERSION

4 years agoTime::HiRes: implement clock_gettime() and clock_getres() for win32
Tomasz Konojacki [Mon, 2 Sep 2019 05:37:17 +0000 (07:37 +0200)]
Time::HiRes: implement clock_gettime() and clock_getres() for win32

To make the implementation easier, the guts of gettimeofday() were
moved to a separate function named GetSystemTimePreciseAsFileTime().

[perl #134398]

4 years ago(perl #133981) fix my stupid mistake
Tony Cook [Thu, 5 Sep 2019 05:37:30 +0000 (15:37 +1000)]
(perl #133981) fix my stupid mistake

4 years agoImprove grammar in pod
Karl Williamson [Tue, 3 Sep 2019 22:54:39 +0000 (16:54 -0600)]
Improve grammar in pod

for  SvPV..._or_null, sv_utf8_downgraded_flags

4 years agoRemove deprecated flag from sv_nosharing.
Karl Williamson [Tue, 3 Sep 2019 20:19:26 +0000 (14:19 -0600)]
Remove deprecated flag from sv_nosharing.

I  recently introduced this by mistake.

4 years agoMerge branch 'ppport fixes' into blead
Karl Williamson [Tue, 3 Sep 2019 03:55:29 +0000 (21:55 -0600)]
Merge branch 'ppport fixes' into blead

This branch contains a large number of changes related to the next
release of Devel::PPPort, which will regenerate its API list for the
first time in many years.

Documentation for 20-ish items is furnished, and the fact that some
dozens more are documented outside perlapi is now noted.

There is a new flag, h, to the =apidoc lines that indicates to hide the
documentation from perlapi, but tie it to the current place, like
perlapio.  It would be not too difficult to have such things
automagically pulled into perlapi from these, should that be desirable.

It turns out there were several undocumented conventions between D:P and
the core code, like having a parameter name of 'cast' or 'type' (in a
macro prototype apidoc line) that allowed D:P to generate proper code to
test the macro in the face of this parameter not being a legal C type.
I have documented these conventions, and added a couple more that the
next release of D:P will understand.  One of those is a parameter of
'block' as used in the recently added WITH_LC_NUMERIC_foo macros.  The
usage example in perlapi now displays correctly.

And for the few macros that I didn't add a way to test in D:P, there is
a new flag, 'u' to indicate that they are unorthodox or unconventional
in some way; that is they won't compile as-is.  This is applied, for
example, to the STR_WITH_LEN() macro which returns a comma separated
pair.

One thing that I hadn't realized before is that moving a function to
mathoms when there is no macro allowing it to be bypassed is effectively
deprecating the use of that function.  mathoms can be cleaned out at any
time, and installations may Configure to not even compile it.  I changed
to require the deprecated flag if something is in mathoms with no macro.

In an earlier commit, I had added the M flag as opposed to the m flag,
which previously had done double duty: 1) the function was implemented
only via a macro; 2) the function is a real function, but there is an
(extra) macro that you can use to get the same functionality as the
function.  I did this to help downstream processing.  And it turns out
that D:P needs that too, and needs it for functions in mathoms.  There
really is no need for an m flag with the mathoms (b) flag.  So the
existing ones that have an extra macro to bypass them are changed to use
the M flag instead of m.  This was done in an earlier commit for other
functions in this file.

4 years agoembed.fnc: Clarify and fix 'b' flag description
Karl Williamson [Sun, 1 Sep 2019 03:07:33 +0000 (21:07 -0600)]
embed.fnc: Clarify and fix 'b' flag description

4 years agoembed.fnc: Fix typo in comment
Karl Williamson [Sun, 1 Sep 2019 03:05:22 +0000 (21:05 -0600)]
embed.fnc: Fix typo in comment

4 years agoembed.fnc: Correct grammar in comment
Karl Williamson [Sun, 1 Sep 2019 03:03:45 +0000 (21:03 -0600)]
embed.fnc: Correct grammar in comment

4 years agoembed.fnc: Trivial comment only
Karl Williamson [Sun, 1 Sep 2019 03:01:40 +0000 (21:01 -0600)]
embed.fnc: Trivial comment only

4 years agoRemove M flag from several functions
Karl Williamson [Sat, 31 Aug 2019 22:55:45 +0000 (16:55 -0600)]
Remove M flag from several functions

These do have an extra macro, but it's not relevant to the situation

4 years agoembed.fnc: Remove experimental status from some internal fcns
Karl Williamson [Sat, 31 Aug 2019 21:57:20 +0000 (15:57 -0600)]
embed.fnc: Remove experimental status from some internal fcns

These have been around long enough that they aren't going away.

4 years agoembed.fnc: Restrict the 'ref' function's accessibility
Karl Williamson [Sat, 31 Aug 2019 21:31:56 +0000 (15:31 -0600)]
embed.fnc: Restrict the 'ref' function's accessibility

This could otherwise cause name collisions.  It is only used in two .c
files in the core

4 years agoNote that config.h contains usable API macros
Karl Williamson [Sat, 31 Aug 2019 21:24:41 +0000 (15:24 -0600)]
Note that config.h contains usable API macros

Things like UVSIZE...

4 years agoFix documentation of WITH_LC_NUMERIC_foo
Karl Williamson [Sat, 31 Aug 2019 20:55:46 +0000 (14:55 -0600)]
Fix documentation of WITH_LC_NUMERIC_foo

Now that Devel::PPPort can handle a macro whose argument is a {...}
block, we can appropriately document these.

4 years agoDocument STMT_START .. STMT_END
Karl Williamson [Sat, 31 Aug 2019 20:55:07 +0000 (14:55 -0600)]
Document STMT_START .. STMT_END

Now that we have the 'u' flag we can document these macros and not have
to break downstream processing.

4 years agoMark BHK macros as unorthodox
Karl Williamson [Sat, 31 Aug 2019 20:47:48 +0000 (14:47 -0600)]
Mark BHK macros as unorthodox

This is because they take a preprocessor token as an argument

4 years agoNote that STR_WITH_LEN() is unorthodox
Karl Williamson [Sat, 31 Aug 2019 20:45:25 +0000 (14:45 -0600)]
Note that STR_WITH_LEN() is unorthodox

Now that we have the 'u' flag for macros, this one returns
a pair of values, so should be marked as such.

4 years agoChange pod for macros that require "literal strings"
Karl Williamson [Sat, 31 Aug 2019 20:40:12 +0000 (14:40 -0600)]
Change pod for macros that require "literal strings"

Now that Devel::PPPort  has the ability to handle these, we can loosen
the syntax for clarity.

4 years agoembed.fnc: Clarify comments, and note 'u' flag exceptions
Karl Williamson [Sat, 31 Aug 2019 20:30:29 +0000 (14:30 -0600)]
embed.fnc: Clarify comments, and note 'u' flag exceptions

The next release of Devel::PPPort will know how to handle all these
unorthodox functions, so no need to declare them as such, and in fact
they shouldn't be declared so.

4 years agoembed.fnc: Add 'u' flag for unorthodox parameter macros
Karl Williamson [Sat, 31 Aug 2019 20:25:26 +0000 (14:25 -0600)]
embed.fnc: Add 'u' flag for unorthodox parameter macros

This tells downstream processors, such as Devel::PPPort that compiling
macros like these will be won't work, as they have some issue.  For
example, aTHX_ expands to have a trailing comma.

4 years agoRefer to CopLABEL_len[_flags] in pod for cop_fetch_label
Karl Williamson [Sat, 31 Aug 2019 20:12:49 +0000 (14:12 -0600)]
Refer to CopLABEL_len[_flags] in pod for cop_fetch_label

4 years agoDocument CopLABEL[_len[_flags]]
Karl Williamson [Sat, 31 Aug 2019 20:10:52 +0000 (14:10 -0600)]
Document CopLABEL[_len[_flags]]

4 years agoNote that various items in perlguts are documented
Karl Williamson [Sat, 31 Aug 2019 19:58:16 +0000 (13:58 -0600)]
Note that various items in perlguts are documented

4 years agoperlguts: Document save_item
Karl Williamson [Sat, 31 Aug 2019 19:59:35 +0000 (13:59 -0600)]
perlguts: Document save_item

4 years agosv.c: Note that some SV flags are documented
Karl Williamson [Sat, 31 Aug 2019 18:59:08 +0000 (12:59 -0600)]
sv.c: Note that some SV flags are documented

4 years agoRemove redundant documentation for PL_parser
Karl Williamson [Sat, 31 Aug 2019 17:10:54 +0000 (11:10 -0600)]
Remove redundant documentation for PL_parser

4 years agoNote that various XS macros are documented
Karl Williamson [Sat, 31 Aug 2019 17:09:19 +0000 (11:09 -0600)]
Note that various XS macros are documented

4 years agoNote that AvFILLp is not for public use
Karl Williamson [Sat, 31 Aug 2019 17:07:38 +0000 (11:07 -0600)]
Note that AvFILLp is not for public use

4 years agoNote that PERL_VERSION and kin are documented
Karl Williamson [Sat, 31 Aug 2019 17:05:58 +0000 (11:05 -0600)]
Note that PERL_VERSION and kin are documented