This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Karl Williamson [Sun, 7 Jan 2018 22:30:06 +0000 (15:30 -0700)]
locale.c: Windows will never be EBCDIC
This adjusts the conditional compilation so that win32 is a subset of
non-EBCDIC. This will be useful in the next commit.
Karl Williamson [Fri, 5 Jan 2018 19:57:37 +0000 (12:57 -0700)]
locale.c: Simplify expression
Since this is operating on C strings, we don't have to check the
lengths, but can rely on the underlying functions to work.
Karl Williamson [Tue, 2 Jan 2018 23:54:28 +0000 (16:54 -0700)]
Cache locale UTF8-ness lookups
Some locales are UTF-8, some are not. Knowledge of this is needed in
various circumstances. This commit saves the results of the last
several lookups so they don't have to be recalculated each time.
The full generality of POSIX locales is such that you can have error
messages be displayed in one locale, say Spanish, while other things are
in French. To accommodate this generality, the program can loop through
all the locale categories finding the UTF8ness of the locale it points
to. However, in almost all instances, people are going to be in either
French or in Spanish, and not in some combination. Suppose it is a
French UTF-8 locale for all categories. This new cache will know that
the French locale is UTF-8, and the queries for all but the first
category can return that immediately.
This simple cache avoids the overhead of hashes.
This also fixes a bug I realized exists in threaded perls, but haven't
reproduced. We do not support locales in such perls, and the user must
not change the locale or 'use locale'. But perl itself could change the
locale behind the scenes, leading to segfaults or incorrect results.
One such instance is the determination of UTF8ness. But this only could
happen if the full generality of locales is used so that the categories
are not all in the same locale. This could only happen (if the user
doesn't change locales) if the environment is such that the perl program
is started up so that the categories are in such a state. This commit
fixes this potential bug by caching the UTF8ness of each category at
startup, before any threads are instantiated, and so checking for it
later just looks it up in the cache, without perl changing the locale.
Karl Williamson [Tue, 2 Jan 2018 21:23:24 +0000 (14:23 -0700)]
locale.c: Avoid duplicate work
As the comments say, the needed value is already readily available
Karl Williamson [Tue, 2 Jan 2018 20:38:16 +0000 (13:38 -0700)]
locale.c: Avoid some work
We've already worked out whether the decimal point is a dot or not. We
can pass that information to the called routine so it doesn't have to
figure it out again.
Karl Williamson [Tue, 2 Jan 2018 20:19:03 +0000 (13:19 -0700)]
locale.c: Use non-control for a format dummy
We need a plain character here. I used a '\e' before, but it would be
better to have something that isn't a control, so just change it to a
blank
Karl Williamson [Thu, 25 Jan 2018 18:28:54 +0000 (11:28 -0700)]
locale.c: Create a block around some code; indent
Under some configurations depending on platform and Configure options,
these declarations are not at the beginning of a block. violating C
language rules.
Karl Williamson [Tue, 2 Jan 2018 19:25:35 +0000 (12:25 -0700)]
locale.c: Avoid some more locale changes
In a few places here we can test if we are already in the locale we want
to be in, and not switch unnecessarily if so.
Karl Williamson [Tue, 2 Jan 2018 06:03:34 +0000 (23:03 -0700)]
Avoid some unnecessary changing of locales
The LC_NUMERIC locale category is kept so that generally the decimal
point (radix) is a dot. For some (mostly) output purposes, it needs to
be swapped into the program's current underlying locale so that a
non-dot can be printed.
This commit changes things so that if the current underlying locale uses
a decimal point, the swap doesn't happen, as it's not needed.
Karl Williamson [Wed, 26 Jul 2017 14:59:33 +0000 (08:59 -0600)]
Teach perl about more locale categories
glibc has various other categories than the ones perl handles, for
example LC_PAPER. This commit adds knowledge of these to perl, so that
one can set them, interrogate them, and have libraries work on them,
even though perl itself does not.
This is in preparation for future commits, where it becomes more
important than currently for perl to know about all the locale
categories on the system.
I looked through various other systems to try to find other categories,
but did not see any. If a system does have such a category, it is
pretty easy to tell perl about it, and recompile. Use the changes in
this commit as a template, and send an email to perlbug@perl.org, so
that the next Perl release will have it.
Karl Williamson [Tue, 2 Jan 2018 05:20:25 +0000 (22:20 -0700)]
perl.h: White-space only
Karl Williamson [Tue, 2 Jan 2018 03:41:21 +0000 (20:41 -0700)]
locale.c: Add compile check for unimplemented behavior
Instead of silently not working.
Karl Williamson [Tue, 2 Jan 2018 03:30:39 +0000 (20:30 -0700)]
locale.c: White-space only
Indent because the previous commit created an enclosing block, and
add a blank line elsewhere
Karl Williamson [Tue, 2 Jan 2018 03:00:03 +0000 (20:00 -0700)]
locale.c: Refactor Ultrix code
Examination shows that this code does nothing unless LC_ALL is defined.
So explicitly test at compile time for that.
Also, two variables don't have to be declared so globally, and by
reducing their scope, by creating a new block we don't have to have
PERL_UNUSED_ARG()s for them
Karl Williamson [Tue, 2 Jan 2018 02:07:19 +0000 (19:07 -0700)]
locale.c: Avoid rescanning a string
We can use a parameter to find out where in the string the portion of
interest starts. Do that to avoid starting again from scratch.
Karl Williamson [Tue, 2 Jan 2018 01:33:59 +0000 (18:33 -0700)]
locale.c: Use fcns instead of macros
Here the macros being used expand into the functions being called,
without adding any value to using the macros, and making things slightly
less clear.
Karl Williamson [Tue, 2 Jan 2018 01:17:41 +0000 (18:17 -0700)]
locale.c: Add const to several variables
Karl Williamson [Tue, 2 Jan 2018 01:15:27 +0000 (18:15 -0700)]
locale.c: Improve, add comments
Karl Williamson [Tue, 2 Jan 2018 01:01:45 +0000 (18:01 -0700)]
perl.h: Add comment, rephrase another
Karl Williamson [Sun, 19 Nov 2017 00:34:25 +0000 (17:34 -0700)]
Perl_langinfo: Teach about YESSTR and NOSTR
These are items that nl_langinfo() used to be required to return, but
are considered obsolete. Nonetheless, this drop-in replacement for that
function should know about them for backward compatibility.
Karl Williamson [Mon, 1 Jan 2018 22:07:45 +0000 (15:07 -0700)]
APItest/t/locale.t: Add some tests
This makes sure that the entries for which the expected return value may
legitimately vary from platform to platform get tested as returning
something, skipping the test if the item isn't known on the platform.
A couple of comments are also added.
Karl Williamson [Thu, 4 Jan 2018 03:41:29 +0000 (20:41 -0700)]
Add check that "$!" is correctly interpreted as UTF-8
We sometimes need to know if an error message is UTF-8 or not.
Previously we checked that it is syntactically valid UTF-8, and that the
LC_MESSAGES locale is UTF-8. But some systems, notably Windows, do not
have LC_MESSAGES. For those, this commit adds a different, semantic,
check that the text of the message when interpreted as UTF-8 is all in
the same Unicode script. This is not foolproof, unlike the LC_MESSAGES
check, but it's better than what we have now for such systems. It
likely is foolproof for non-Latin locales, as any message will have a
bunch of characters in that locale, and no ASCII Latin ones. For a
Latin locale, these ASCII letters could be intermixed with the UTF-8
ones, causing potential ambiguity.
Karl Williamson [Wed, 15 Nov 2017 05:27:06 +0000 (22:27 -0700)]
Remove uncompilable code
This code was never compiled because of a misspelling in the #ifdef.
No problem surfaced, so just remove it. The next commit adds a different
check.
Karl Williamson [Tue, 9 Jan 2018 02:08:54 +0000 (19:08 -0700)]
perl.c: Move initialization of inversion lists
This is now done very early in the file, as it may be needed for
initializing the locale handling.
Karl Williamson [Thu, 18 Jan 2018 21:09:24 +0000 (14:09 -0700)]
isSCRIPT_RUN: Document in perlintern
Karl Williamson [Tue, 9 Jan 2018 02:11:52 +0000 (19:11 -0700)]
An empty string is a script_run, but marked INVALID
Karl Williamson [Thu, 18 Jan 2018 21:08:47 +0000 (14:08 -0700)]
isSCRIPT_RUN: A sequence of entirely Inherited chars is Inherited
Karl Williamson [Thu, 18 Jan 2018 21:07:43 +0000 (14:07 -0700)]
regexec.c: Add comment
Karl Williamson [Thu, 18 Jan 2018 21:05:23 +0000 (14:05 -0700)]
Fix bug in isSCRIPT_RUN with digit following unassigned
This was being treated as a run, but shouldn't be one.
Karl Williamson [Thu, 18 Jan 2018 20:00:06 +0000 (13:00 -0700)]
isSCRIPT_RUN: Can short cut if not in UTF-8
All characters representable by single bytes are either Common or Latin,
so must be a script run. If we aren't asking for what the script is we
can return immediately. If we are, the run is Latin if any character in
it is Latin, otherwise is Common.
Karl Williamson [Sun, 7 Jan 2018 04:16:15 +0000 (21:16 -0700)]
Give isSCRIPT_RUN() an extra parameter
This allows it to return the script of the run.
Karl Williamson [Sat, 6 Jan 2018 23:15:12 +0000 (16:15 -0700)]
charclasslists.h: script enums visible to CORE,EXT
This exposes the enum definitions for the script extensions property to
the perl code and extensions, for use in future commits.
Karl Williamson [Sat, 6 Jan 2018 23:13:06 +0000 (16:13 -0700)]
regen/mk_invlists.pl: Allow override of where enums get defined
This adds code so that the enums defined by this, which are ordinarily
only used by regexec.c ban be specified to be somewhere else instead.
Karl Williamson [Sat, 6 Jan 2018 23:09:57 +0000 (16:09 -0700)]
regen/mk_invlists.pl: Allow multiple files to access
This changes the code so that the symbols defined by this program
can be #define'd in more than one file.
Karl Williamson [Thu, 18 Jan 2018 21:02:33 +0000 (14:02 -0700)]
regexec.c: Fix typo in comment
Karl Williamson [Sat, 6 Jan 2018 23:18:45 +0000 (16:18 -0700)]
Fix bug in script runs that start with Common
This is a follow on to
8535a06fea02528fe726855a139fcbd360d1fc6e. That
fixed one case where the first character was in the Common script,
things did not work properly. It did not catch the case where a future
character in the string was non-Common from a script that has its own
set of digits, and this commit fixes that.
This just entails moving a block of code to slightly earlier.
Karl Williamson [Thu, 11 Jan 2018 00:10:09 +0000 (17:10 -0700)]
locale.c: Make sure variable is always defined
A future commit assumes this variable is there even on non-DEBUGGING
builds. #define it to 0 for those.
Karl Williamson [Thu, 18 Jan 2018 00:01:00 +0000 (17:01 -0700)]
my_atof(): Lock dot radix
This commit shows some redundant checks. It examines the text and if it
finds a dot in the middle of the number, and the locale is expecting
something else, it toggles LC_NUMERIC to be the C locale so that the dot
is understood. However, during further parsing, grok_numeric_radix()
gets called and sees that the locale shouldn't be C, and toggles it
back. That ordinarily would cause the dot to not be recognized, but
this function always recognizes a dot no matter what the locale. So
none of our tests fail. I'm not sure if this is always the case, and I
don't understand this area of the code all that well, but there is a
simple way to cause grok_numeric_radix to not change the locale back,
and that is to call the macro LOCK_LC_NUMERIC_STANDARD() when changing
it the first time in my_atof(). The purpose of this macro is precisely
this situation, so that recursed calls don't try to override the
decisions of the outer calls
Karl Williamson [Wed, 24 Jan 2018 22:57:30 +0000 (15:57 -0700)]
hints/hpux.sh: HP-UX mbrlen() and mbrtowc() don't work
In spite of there being man pages for these, the #include file doesn't
define the mbstate_t type which is required for a parameter to these
functions.
Perhaps the Configure probe could be enhanced so it doesn't return
defined unless these can be successfully compiled, but for now use the
hints file.
Karl Williamson [Sun, 21 Jan 2018 17:08:33 +0000 (10:08 -0700)]
perlembed: Fix typos
Perl is capitalized when referring to the language; lowercased when
referring to a particular executable.
Tony Cook [Wed, 31 Jan 2018 00:00:01 +0000 (11:00 +1100)]
(perl #132761) Devel::PPPort updates for older perls
Tony Cook [Tue, 30 Jan 2018 23:46:49 +0000 (10:46 +1100)]
bump $Devel::PPPort::VERSION to 3,39
Pali [Fri, 26 Jan 2018 18:39:49 +0000 (19:39 +0100)]
Devel::PPPort: Use croak_nocontext() intead of croak() when dTHX is not declared
Pali [Fri, 26 Jan 2018 18:39:14 +0000 (19:39 +0100)]
Devel::PPPort: Declare dTHX in croak_xs_usage()
CvGV() takes aTHX_ as first argument.
Tony Cook [Thu, 25 Jan 2018 03:39:54 +0000 (14:39 +1100)]
(perl #132761) croak_xs_usage() shouldn't accept a THX arguement
Pali [Tue, 23 Jan 2018 22:36:06 +0000 (23:36 +0100)]
Devel::PPPort: Do not run tests which use \N{U+XX} on Perl 5.12.0
Perl 5.12.0 has bug when parsing \N{U+XX} syntax and throw error:
Invalid hexadecimal number in \N{U+...} in regex.
Pali [Tue, 23 Jan 2018 22:00:55 +0000 (23:00 +0100)]
Devel::PPPort: Do not define PERL_MAGIC_qr more times
make regen show warning: magic: PERL_MAGIC_qr already provided by misc
Remove it from misc, but because misc depends on it, put magic before misc.
Pali [Tue, 23 Jan 2018 21:50:20 +0000 (22:50 +0100)]
Devel::PPPort: Do not mask Perl_warn_nocontext and Perl_croak_nocontext
It cause compile errors on older threaded Perl versions.
Karl Williamson [Mon, 22 Jan 2018 19:55:31 +0000 (12:55 -0700)]
Use dfa to speed up translating UTF-8 into code point
This dfa is available from the internet has the reputation of being the
fastest general translator. This commit changes to use it at the
beginning of our translator, modifying it slightly to accept surrogates
and all 4-byte Perl-extended. If necessary, it drops down into our
translator to handle errors and warnings and Perl extended.
It shows some improvement over our base translation:
Key:
Ir Instruction read
Dr Data read
Dw Data write
COND conditional branches
IND indirect branches
_m branch predict miss
- indeterminate percentage (e.g. 1/0)
The numbers represent raw counts per loop iteration.
unicode::utf8n_to_uvchr_0x007f
ord(X)
blead dfa Ratio %
----- ----- -------
Ir 359.0 359.0 100.0
Dr 111.0 111.0 100.0
Dw 64.0 64.0 100.0
COND 42.0 42.0 100.0
IND 5.0 5.0 100.0
COND_m 2.0 0.0 Inf
IND_m 5.0 5.0 100.0
unicode::utf8n_to_uvchr_0x07ff
ord(X)
blead dfa Ratio %
----- ----- -------
Ir 478.0 467.0 102.4
Dr 132.0 133.0 99.2
Dw 79.0 78.0 101.3
COND 63.0 57.0 110.5
IND 5.0 5.0 100.0
COND_m 1.0 0.0 Inf
IND_m 5.0 5.0 100.0
unicode::utf8n_to_uvchr_0xfffd
ord(X)
blead dfa Ratio %
----- ----- -------
Ir 494.0 486.0 101.6
Dr 134.0 136.0 98.5
Dw 79.0 78.0 101.3
COND 67.0 61.0 109.8
IND 5.0 5.0 100.0
COND_m 2.0 0.0 Inf
IND_m 5.0 5.0 100.0
unicode::utf8n_to_uvchr_0x1fffd
ord(X)
blead dfa Ratio %
----- ----- -------
Ir 508.0 505.0 100.6
Dr 135.0 139.0 97.1
Dw 79.0 78.0 101.3
COND 70.0 65.0 107.7
IND 5.0 5.0 100.0
COND_m 2.0 1.0 200.0
IND_m 5.0 5.0 100.0
unicode::utf8n_to_uvchr_0x10fffd
ord(X)
blead dfa Ratio %
----- ----- -------
Ir 508.0 505.0 100.6
Dr 135.0 139.0 97.1
Dw 79.0 78.0 101.3
COND 70.0 65.0 107.7
IND 5.0 5.0 100.0
COND_m 2.0 1.0 200.0
IND_m 5.0 5.0 100.0
Each code point represents an extra byte required in its UTF-8
representation from the previous one.
Karl Williamson [Tue, 30 Jan 2018 19:34:20 +0000 (12:34 -0700)]
regcomp.c: Silence compiler maybe uninit warnings
I don't believe that actually these can be used uninitialized, but
initialize them anyway to silence the warnings.
Matthew Horsfall [Tue, 23 Jan 2018 19:45:06 +0000 (14:45 -0500)]
Use the correct path for valgrind logs in make test.valgrind
Karl Williamson [Tue, 30 Jan 2018 03:47:56 +0000 (20:47 -0700)]
Add ANYOFM regnode
This is a specialized ANYOF node for use when the code points in it
have characteristics that allow them to be matched with a mask instead
of a bit map. When this happens, the speed up is pretty spectacular:
Key:
Ir Instruction read
Dr Data read
Dw Data write
COND conditional branches
IND indirect branches
The numbers represent raw counts per loop iteration.
Results of ('b' x 10000) . 'a' =~ /[Aa]/
blead mask Ratio %
-------- ------- -------
Ir 153132.0 25636.0 597.3
Dr 40909.0 2155.0 1898.3
Dw 20593.0 593.0 3472.7
COND 20529.0 3028.0 678.0
IND 22.0 22.0 100.0
See the comments in regcomp.c or
http://nntp.perl.org/group/perl.perl5.porters/249001 for a description
of the cases that this new technique can handle. But several common
ones include the C0 controls (on ASCII platforms), [01], [0-7], [Aa] and
any other ASCII case pair.
The set of ASCII characters also could be done with this node instead of
having the special ASCII regnode, reducing code size and complexity.
I haven't investigated the speed loss of doing so.
A NANYOFM node could be created for matching the complements this one
matches.
A pattern like /A/i is not affected by this commit, but the regex
optimizer could be changed to take advantage of this commit. What would
need to be done is for it to look at the first byte of an EXACTFish node
and if its one of the case pairs this handles, to generate a synthetic
start class for it. This would automatically invoke the sped up code.
Karl Williamson [Mon, 22 Jan 2018 20:55:03 +0000 (13:55 -0700)]
recomp.sym: Add ANYOFM regnode
This uses a mask instead of a bitmap, and is restricted to representing
invariant characters under UTF-8 that meet particular bit patterns.
Karl Williamson [Thu, 25 Jan 2018 20:35:09 +0000 (13:35 -0700)]
regcomp.c: White-space only
Indent code that the previous commit created a block around
Karl Williamson [Thu, 25 Jan 2018 20:26:16 +0000 (13:26 -0700)]
regcomp.c: Allow a fcn param to be NULL
In which case handling is skipped. This is in preparation for a future
commit which will use this function in a slightly different manner
Karl Williamson [Fri, 29 Dec 2017 22:45:38 +0000 (15:45 -0700)]
regexec.c: Use word-at-a-time to repeat /i single byte pattern
For most of the case folding pairs, like [Aa], it is possible to use a
mask to match them word-at-a-time in regrepeat(), so that long sequences
of them are handled with significantly better performance.
Karl Williamson [Fri, 29 Dec 2017 22:17:41 +0000 (15:17 -0700)]
regexec.c: Use word-at-a-time to repeat a single byte pattern
There is special code in the function regrepeat() to handle instances
where the pattern to repeat is a single byte. These all can be done
word-at-a-time to significantly increase the performance of long
repeats.
Karl Williamson [Wed, 27 Dec 2017 01:25:26 +0000 (18:25 -0700)]
regexec.c: Replace loop by memchr()
This can be called on a potentially long string.
Karl Williamson [Tue, 30 Jan 2018 03:33:14 +0000 (20:33 -0700)]
Compile variant_byte_number() for EBCDIC
Future commits will use this without regard to platform.
Karl Williamson [Tue, 30 Jan 2018 03:07:51 +0000 (20:07 -0700)]
Use different scheme to handle MSVC6
Recent commit
0b08cab0fc46a5f381ca18a451f55cf12c81d966 caused a function
to not be compiled when running on MSVC6, and hence its callers needed
to use an alternative mechanism there. This is easy enough, it turns
out, but it also turns out that there are more opportunities to call
this function. Rather than having each caller have to know about the
MSVC6 problem, this current commit reimplements the function on that
platform to use a slow, dumb method, so knowing about the issue is
confined to just this one function.
Karl Williamson [Sun, 28 Jan 2018 21:48:53 +0000 (14:48 -0700)]
APItest/APItest.xs: Simplify mappings
Instead of using SVs, use the underlying C type, and so the code here
doesn't have to deal with the SV conversions
Karl Williamson [Sun, 28 Jan 2018 21:47:16 +0000 (14:47 -0700)]
APItest/t/utf8_warn_base.pl: White-space only
This outdents a bunch of code to make it a shift width of 2 instead of 4
because the nesting was getting too deep, making the space available on
a line too short.
Karl Williamson [Sun, 28 Jan 2018 21:43:00 +0000 (14:43 -0700)]
APItest/t/utf8_warn_base.pl: Improve diagnostics
Karl Williamson [Sun, 28 Jan 2018 00:43:00 +0000 (17:43 -0700)]
Add utf8n_to_uvchr_msgs()
This UTF-8 to code point translator variant is to meet the needs of
Encode, and provides XS authors with more general capability than
the other decoders.
Karl Williamson [Sun, 28 Jan 2018 17:02:11 +0000 (10:02 -0700)]
Don't use variant_byte_number on MSVC6
See [perl #132766]
Karl Williamson [Thu, 25 Jan 2018 17:37:04 +0000 (10:37 -0700)]
inline.h: Clarify comment
Karl Williamson [Thu, 25 Jan 2018 17:25:27 +0000 (10:25 -0700)]
Don't use C99 ULL constant suffix
The suffix ULL in, e.g., 7ULL, is C99, and since perl supports C89, we
can't use it. Change these occurrences to wrap those that would exceed
32 bits to use UINTMAX_C(...).
perl.h has logic to define that macro appropriately if the compiler
doesn't already know it.
Karl Williamson [Mon, 29 Jan 2018 17:46:02 +0000 (10:46 -0700)]
Fix bug in new [[:ascii:]] nodes
Commit
aff4cafe362e55c7722ba12952e287a7d1770cb9 added new regnodes for
[[:ascii:]] and its complement for a significant performance
improvement. In looking at the code later, I realized that there was a
bug in find_byclass() in that it didn't continue to try after an initial
trial match succeeds, but getting the whole pattern to match fails.
It's supposed to try again with the next ascii.
This commit fixes that, and adds tests.
I thought that these new changes might lower the performance improvement
of the original, but it doesn't. Here's a typical one where we have a
string of a million non-ascii 2-byte characters, followed by a single
ASCII one.
posixa ascii Ratio %
------- -------- --------
Ir Inf Inf 665.9
Dr Inf 250907.0 1993.1
Dw Inf 597.0 167603.7
COND Inf 500532.0 399.7
IND 22.0 22.0 100.0
(posixa is the old way of doing things; Inf just means the number was
too large for the program to want to display it; the ratio is still
valid).
Karl Williamson [Mon, 29 Jan 2018 16:51:45 +0000 (09:51 -0700)]
regexec.c: Extract some macro code into a submacro
A future commit will reuse this code, so will avoid duplication.
Karl Williamson [Mon, 29 Jan 2018 04:02:49 +0000 (21:02 -0700)]
regexec.c: Use different method for finding adjacent chars
Commit
3b6c52ce7db772c296d8f10d92dec46af03391dc changed the variable
name and commented what the code was doing. This changes that code to
use a different mechanism that I think is simpler, and is extensible so
that it can be used not just for instances in which the input is
examined character-by-character.
Until this commit, a boolean was used to indicate that we've found
adjacent characters. This commit saves the address of the next
character, so when we find the next match, if it begins at the saved
address, we know it is adjacent.
Karl Williamson [Mon, 29 Jan 2018 03:33:10 +0000 (20:33 -0700)]
regexec.c: Extract some macro code into a sub-macro
By doing this, it becomes common code with another place in the code, so
the duplication can be removed.
Karl Williamson [Mon, 29 Jan 2018 02:15:25 +0000 (19:15 -0700)]
regexec.c: Collapse some macros
By adding a utf8ness parameter these 4 macros can be collapsed into 2,
with no increase in run time, as the parameter is always a compile time
constant and modern compilers will avoid the conditional.
Karl Williamson [Mon, 29 Jan 2018 23:05:41 +0000 (16:05 -0700)]
Fix bug in t/re/regex_sets_compat.t
This tests the tests that regexp.t has and which have bracketed
character classes. It converts those to the regex sets notation, and
verifies they still work. It was adding and extra blank at the end of
the pattern in some cases, causing it to fail.
Karl Williamson [Fri, 26 Jan 2018 19:33:20 +0000 (12:33 -0700)]
regexec.c: Use meaningful variable name; comment
It took me quite a while to figure out what 'tmp' is doing here. So I
renamed it to a more meaningful name, and added comments.
Karl Williamson [Thu, 25 Jan 2018 20:36:25 +0000 (13:36 -0700)]
regcomp.c: Clarify comment
Karl Williamson [Thu, 25 Jan 2018 20:20:24 +0000 (13:20 -0700)]
regcomp.c: Use existing function to do task
The function does it better than this code, which looked too deeply into
the internals, and got it wrong sometimes, because it didn't look at the
state of the inversion. The consequences are not a bug, but potentially
forgoing an optimization, or needlessly looking for an optimization that
will turn out to not be there.
Karl Williamson [Tue, 23 Jan 2018 20:38:04 +0000 (13:38 -0700)]
regcomp.c: Fix typo in comment
Steve Hay [Thu, 25 Jan 2018 13:38:36 +0000 (13:38 +0000)]
Define I_STDINT for gcc, and for VC++ 2010 onwards
Fixes the Math-MPFR-4.0.0 build on 5.27.7 onwards.
See: https://www.nntp.perl.org/group/perl.perl5.porters/2018/01/msg248964.html
Karl Williamson [Thu, 25 Jan 2018 01:05:31 +0000 (18:05 -0700)]
embed.fnc: Formal param shouldn't be const
Tony Cook [Thu, 25 Jan 2018 00:43:07 +0000 (11:43 +1100)]
George Hartzell is now a perl author
Tony Cook [Thu, 25 Jan 2018 00:42:51 +0000 (11:42 +1100)]
bump $Errno::VERSION
George Hartzell [Wed, 24 Jan 2018 21:36:10 +0000 (13:36 -0800)]
Typo: 'at alia' should be 'et alia'
Craig A. Berry [Tue, 23 Jan 2018 03:37:08 +0000 (21:37 -0600)]
Fix reversed logic from
1d60dc3fde1056479b.
Fat-fingered this one somehow.
Chris 'BinGOs' Williams [Mon, 22 Jan 2018 20:12:44 +0000 (20:12 +0000)]
Remove Module::CoreList::TieHashDelta
Chris 'BinGOs' Williams [Mon, 22 Jan 2018 19:58:00 +0000 (19:58 +0000)]
Reset Module-CoreList versioning back to 5.
20180220
Karl Williamson [Mon, 22 Jan 2018 19:45:14 +0000 (12:45 -0700)]
Allow space for NUL is UTF-8 array decls
In grepping the source, I noticed that several arrays that are for
holding UTF-8 characters did not allow space for a trailing NUL. This
commit adds that.
Pali [Mon, 22 Jan 2018 17:29:11 +0000 (18:29 +0100)]
Devel::PPPort: Skip ASCII tests on non-ASCII platforms
Dagfinn Ilmari Mannsåker [Mon, 22 Jan 2018 18:04:25 +0000 (18:04 +0000)]
Remove obsolete reference to Module::CoreList::TieHashDelta
%Module::CoreList::version is no longer implemented via
Module::CoreList::TieHashDelta, but generated from
%Module::CoreList::delta upfront.
Dagfinn Ilmari Mannsåker [Mon, 22 Jan 2018 13:10:57 +0000 (13:10 +0000)]
Improve handling of broken versions in Module::CoreList::is_core
- Only parse the user-provided version once
- Include the invalid version in the error message
- Ignore broken versions in M:CL's own data
jdhedden [Sat, 20 Jan 2018 20:38:03 +0000 (15:38 -0500)]
Upgrade to threads::shared 1.58
jdhedden [Sat, 20 Jan 2018 20:31:53 +0000 (15:31 -0500)]
Upgrade to threads 2.21
Karl Williamson [Mon, 22 Jan 2018 00:55:23 +0000 (17:55 -0700)]
PATCH: [perl #132750] Silence uninit warning
I inspected the code, and there is no problem here; it's a compiler
mistake. Nevertheless, smply initializing the variable silences it.
Father Chrysostomos [Mon, 22 Jan 2018 00:19:56 +0000 (16:19 -0800)]
Follow-up to
fd77b29b3be4
As Zefram pointed out, I left in a piece of code that caused one
branch to continue to behave as before. The change was ineffective
and the tests happened to be written in such a way as to take the
other branch.
Aaron Crane [Sun, 21 Jan 2018 20:28:52 +0000 (20:28 +0000)]
perlpolicy: update policy in accordance with recent moderator discussions
Substantive changes:
Firstly, as promised earlier, we have clarified that, by forwarding a
message to the list, the sender takes responsibility for the content of the
message in question.
Secondly, we have changed the policy regarding ban lengths. Previously,
third or subsequent instances of unacceptable behaviour resulted in a ban
twice the length of the person's previous ban. Under the new policy, a third
instance of unacceptable behaviour results in a further warning, and a
fourth instance results in a ban of indefinite length.
Our rationale is that temporary bans are for the offender: to give them the
opportunity to change their behaviour in a way that aligns with our
community expectations. However, if the person in question fails to take
advantage of that opportunity, our focus must shift to the community: we aim
to protect other list members from having to bear the burden of unacceptable
behaviour.
Finally, we welcome Karen Etheridge and Todd Rinaldo as additional
moderators. I'd like to offer both Karen and Todd my personal thanks for
agreeing to serve.
Craig A. Berry [Sun, 21 Jan 2018 18:47:45 +0000 (12:47 -0600)]
Make VMS CRTL features work for embedders.
The various run-time features of the CRTL that Perl uses were being
fetched at image activation time and stored in static variables
for later reference. That works ok when Perl is the program, but
not when Perl is the library since in the latter case attempts by
an embedder to alter the feature settings before invoking Perl were
being ignored.
So store the feature index, not its value, and use that index to
get the current value via decc$feature_get_value whenever we need
it. This means function calls rather than data references, but
there is no measurable impact on performance.
Also fix a bug in the handling of the feature to disable the POSIX
root; we were saying we were disabling it but weren't really doing
so because its current value cannot be set for some reason (only
its default value). Since the feature only affects the conversion
of filenames between Unix and VMS format and we don't use the CRTL's
functions for that, it's unlikely this bug ever caused trouble.
Tomasz Konojacki [Sat, 20 Jan 2018 22:54:34 +0000 (23:54 +0100)]
loc_tools.pl: untaint _source_location's return value and fix a warning
Some of our tests are running with -T and it turns out that something in
File::Spec::Unix is the tainting the return value of _source_location().
Additionally, when warnings are enabled globally (with either $^W or -W),
not passing the last argument (filename) to File::Spec->catpath results in
an undefined variable warning.
Tom Wyant [Sat, 20 Jan 2018 22:09:00 +0000 (15:09 -0700)]
Fix typos in script_run documentation
Chris 'BinGOs' Williams [Sat, 20 Jan 2018 11:06:19 +0000 (11:06 +0000)]
Bibbidi-Bobbidi-Boo
Abigail [Sat, 20 Jan 2018 04:18:09 +0000 (05:18 +0100)]
Update Module::CoreList for 5.27.9
Abigail [Sat, 20 Jan 2018 04:12:23 +0000 (05:12 +0100)]
Bump the perl version in various places for 5.27.9