| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit a0d0e21ea6ea90a2231 ("perl-5.000") added perlop.pod, where s///
was described as returning 0 if no substitutions were made.
commit e37d713d85ec003d03d ("perl 5.003_01: pod/perlop.pod") then
"fixed" the documentation by saying it returns the empty string instead.
And that's how it's been since 1996.
What s/// actually returns on match failure is the canonical false
value, which is both "" and 0 at the same time (depending on
numeric/string context).
|
|
|
|
|
| |
This has been supported since commit
67f2cc757fdda0bee562f2f5899884d09ca382ef in Perl 5.21.7.
|
|
|
|
|
|
| |
This is a new API function, partly substituting for the my_strerror()
that was recently removed from the public API, but also incorporating
the decoding work that's done for $!.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the stringification of "$!" was considered to be UTF-8 if it
had any characters with the high bit set, and everything was
syntactically legal UTF-8. This may to correctly guess on short strings
where there are only a few non-ASCII bytes. This could happen in
languages based on the Latin script where many words don't use
non-ASCII.
This commit adds a check that the locale is a UTF-8 one. That check is
a call to an already-existing subroutine which goes to some lengths to
get an accurate answer, and should be essentially completely reliable on
modern systems that have nl_langinfo() and/or mbtowc().
See the thread starting at
http://nntp.perl.org/group/perl.perl5.porters/245902
|
|
|
|
|
|
|
|
| |
The statement that they are in separate namespaces was never really true.
Since the recent commit 489c16bfa14d460701bd76a4a4f0658f1200509a a
single I/O object can no longer be opened both ways at once, so the old
statement is now totally false. Replace it with something describing
the new situation.
|
|
|
|
| |
The core is already clean for this.
|
| |
|
|
|
|
|
|
|
|
|
| |
RT #131912
the (1 << i) is harmless for large i, but triggers an 'undefined-behavior'
errror in clang.
So work around it.
|
|
|
|
|
|
|
| |
In the test case, scan_ident() ends up fetching another line
(updating PL_linestart), and since in this case we don't
successfully parse ${identifier} s (and PL_bufptr) end up being
before PL_linestart.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously the /o would be inherited by the second match if the first
match was successful, but only on non-threaded builds.
The op-tree rewriting done on non-threaded builds could also confuse
the interpreter, possibly resulting in the match op receiving
the argument intended for the regcomp op.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the "1e-" in "1e--5" would be treated as "1", but consumed
the "e-".
This wasn't an issue for hex floats.
I considered (and implemented) croaking instead, but this was
inconsistent with the behaviour for hex floats, which only reach this
code if a full hex float has been parsed.
|
|
|
|
|
|
| |
strerror_l makes the my_strerror function trivial, as it doesn't have to
worry about critical sections, etc. Even on unthreaded perls, it avoids
having to change the current locale, and then change it back.
|
|
|
|
|
|
|
|
|
|
| |
This moves all the handling of the case where there are no locale
messages, instead of splitting it up across long stretches of
conditionally compiled code. This code is essentially trivial, and seen
to be so when it isn't split up; this prepares for the next commit.
The final return of the function is still split off so that all branches
go through it, and the debugging code adjacent to it.
|
|
|
|
| |
This is moved so it gets executed for all branches.
|
|
|
|
|
|
|
| |
This commit will now initialize the thread-safe C locale object if the
POSIX 2008 functions are available, regardless of whether the perl is
threaded or not. This will allow for a future commit that uses
them, and which is a win on unthreaded builds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the controlling #define for using the POSIX 2008 locale
functions to "USE_POSIX_2008_LOCALE". The previous controlling name
"USE_THREAD_SAFE_LOCALE" is retained for backward compatibility.
The reason for this change is that we may add thread-safe locale
handling even on platforms that don't have Posix 2008, so the name
USE_THREAD_SAFE_LOCALE would be used for controlling things in that
situation.
In other words, the concepts may become distinct, and so prepare for
that.
|
| |
|
|
|
|
|
|
|
|
|
| |
On VMS, a file without an extension is really a file with an
explicitly specified "." indicating zero-length extension. This
was causing tests to fail with, for example, "abbbbbbbbbbbbc" not
matching "abbbbbbbbbbbbc." as returned by glob.
So add a ".tmp" extension to all the temp files on VMS only.
|
|
|
|
|
|
| |
When encountering a question mark in a filespec being converted
from Unix to VMS format, we were inadvertently adding an escaped
space because of a missing break in a switch.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
For -flto -mieee-fp builds, the _LIB_VERSION definition in perl.c and
in libieee conflict, causing a build failure.
The test we perform in Configure checks only that such a variable exists
(and is declared), it doesn't check that we can *define* such a variable,
which the code in pp.c tried to do.
So rather than trying to define the variable, just initialize it during
our normal interpreter initialization.
|
|
|
|
|
|
|
|
| |
Commit d819dc506b9fbd0d9bb316e42ca5bbefdd5f1d77 did not fully work. I
switched the wrong thing that should have been in native vs
Unicode/Latin1, and forgot to update the test file.
Hopefully this is correct.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Call checkers established by core code were being set through
cv_set_call_checker(), so requiring GVs to be created in some cases where
they could be avoided. Make all the checkers non-GV-namegv capable,
and set them with cv_set_call_checker_flags().
The checkers for Devel::Peek::Dump() and
utf8::{unicode_to_native,native_to_unicode}() were already fit to handle
non-GV names, so required no changes. The checker for CORE:: subs,
ck_entersub_args_core(), was naughtily using the name to decide which sub
it was dealing with in some cases, so move that information into the ckobj
that was already being used to identify the sub in most cases. It also
required reformulation of some error reporting code to use cv_name().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new cv_get_call_checker_flags() is the obvious counterpart to
the existing cv_set_call_checker_flags(), which was added without
providing any public way to retrieve the flag state. Not only does
cv_get_call_checker_flags() return the CALL_CHECKER_REQUIRE_GV flag
state, it also takes a flags parameter as an input, to allow for
future expansion. The gflags input can at minimum be used for the
caller to indicate which flags it understands, if more checker flags
are added in the future, in case such flags are not ignorable in
the way that CALL_CHECKER_REQUIRE_GV is. In this commit the gflags
parameter is applied to indicate whether the caller understands the
CALL_CHECKER_REQUIRE_GV flag, or more precisely (due to the funny inverted
sense of the flag) whether it understands the flag being clear. This use
of gflags isn't really necessary, but establishes the pattern of usage.
|
|
|
|
|
|
|
| |
The Changes file is still horriby out of date, and the trickier-to-fix (or
test) bugs remain open in RT, but it seems better to get a release out with
the fixed bugs than delay it further whilst figuring out the cleanest way to
fix the open bugs. The perfect is the enemy of the good.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C++11 changed from earlier versions to require space between the end of
a string literal and a macro, so that a feature can unambiguously be
added to the language. Starting in g++ 6.2, the compiler emits a
deprecation warning when there isn't a space (presumably so that future
versions can support C++11). This commit fixes ExtUtils::Constant
This patch also changes any affected lines that exceed 79 columns, as
specified by perlhack.
Code and modules included with the Perl core need to be compilable using
C++. This is so that perl can be embedded in C++ programs. (Actually,
only the hdr files need to be so compilable, but it would be hard to
test that just the hdrs are compilable.) So we need to accommodate
changes to the C++ language.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code generated by ExtUtils::Constant can look something like:
static int
constant (..., IV *iv_return) {
switch (...) {
case ...:
*iv_return = ...;
return PERL_constant_ISIV;
...
}
}
{
int type;
IV iv;
type = constant(..., &iv);
switch (type) {
case PERL_constant_ISIV:
PUSHi(iv);
...
}
}
and the compiler isn't clever enough to realise that the value of iv
is only used in the code path where its been set.
So initialise it to zero to shut gcc up. Ditto nv and pv.
|
|
|
|
|
|
|
|
|
|
| |
croak doesnt require a context param to be pushed on the c stack,
Perl_croak does, since Perl_croak/croak is very rarily called, minimize
the machine code of the error branches
don't do dTHX in thread aware XS code, this just sets up another my_perl
var for the scope of const-xs BOOT sum masking the original declared
my_perl in the outer C scope
|
|
|
|
|
| |
Spotted by dsteinbrunner@pobox.com, reported as CPAN #85527.
However, I think that the "to to" should be "to do", not "to".
|
|
|
|
|
|
|
|
| |
gcc (and probably others) was warning about a mismatch for between `int`
(implied by the format %d) and the actual type passed, `line_t`. Avoid this
by explicitly casting to UV, and using UVuf.
CPAN #63832
|
|
|
|
|
|
|
|
|
|
| |
Since v5.25.5-46-g1257c08, sassign has been correctly listed in
regen/opcodes as a binary op ('2') rather than as a base op, so there's no
need to special-case it in regen/op_private any more.
This commit makes no functional changes, because since
v5.25.5-46-g1257c08, $args2{sassign} was redundantly getting set to a true
value twice, which was harmless. Now it only gets set once.
|