| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
The Configure changes here were generated using a version of metaconfig
that copies U/modified/i_stdlib.U from dist/U/vaproto.U, and changes it to
unconditionally define the i_stdlib Configure variable. That variable is
used by a large number of other Configure units, so it's not actually
practical to try and remove the relevant unit entirely.
|
|
|
|
|
|
| |
The Configure changes here were generated using a version of metaconfig
that modifies the prototype.U and Protochk.U units to assume that C89
prototypes work.
|
|
|
|
| |
However, we do preserve it outside PERL_CORE for the use of XS authors.
|
|
|
|
|
|
|
| |
"Sane" means that it works correctly on bytes with their high bit set, as
C89 also requires.
We therefore no longer need to probe for and/or use BSD bcmp().
|
|
|
|
| |
We can therefore also avoid probing for and/or using BSD bcopy().
|
|
|
|
| |
This means we also never need to consider using BSD bzero().
|
| |
|
| |
|
|
|
|
|
|
| |
<sys/time.h> isn't necessarily needed, but apparently increases
portability, since the rusage structure defined in <sys/resource.h>
has struct timeval members.
|
|
|
|
|
|
|
|
| |
argument.
Reformat code in one foreach block for readability. Make podcheck happy.
For: RT #132145
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This only applies to non-threaded builds. Threaded builds were
already fine.
|
|
|
|
|
| |
6a4fc5265ba102 removed the useless assignment to it, but not the
var itself.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The concise_stashref sub, for dumping all subroutines in a package,
would assign the value of a stash element to *s, and then use *s
to access the code ref in it. If you do *s = *foo and then later
*s = \&bar, then you have assigned \&bar to *foo{CODE}, and even
a localisation of *s beforehand will not help. That is exactly
what B::Concise was doing when dumping a package with some subref
elements.
|
|
|
|
|
|
|
|
|
| |
Commit v5.21.6-383-gc290e18 stopped gv_fetchmeth_sv from working cor-
rectly when fetching a constant with a utf8 name, because it no longer
passed the utf8 flag to the underlying functions.
That utf8 flag gets passed to gv_init when upgrading a glob proxy
(such as a constant) into a real glob.
|
| |
|
|
|
|
|
| |
This variable stopped being used in perl-5.005_02-1108-g8bac7e0 but
continued to exist until now.
|
|
|
|
| |
For: RT #132145
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a UTF-8 locale, if the PERL_UNICODE environment variable is set,
perl may add a :utf8 layer.
v5.23.1-197-gfb10a8a deprecated using sysread(), syswrite() etc on such
handles, which meant that a test run under PERL_UNICODE could produce
a significant number of deprecation warnings.
Prevent those warnings, typically by binmode(), but in one case by
disabling the warning.
|
|
|
|
|
|
| |
It turns out that this OS does not implement all of POSIX 2008, and so
certain tests were failing. This moves the eval earlier and makes sure
it succeeds before calling the API function
|
|
|
|
|
| |
This automatically fixes the bug where it always returned a dot for the
decimal point character.
|
|
|
|
|
|
| |
This is designed to generally replace nl_langinfo() in XS code. It is
thread-safer, hides the quirks of perl's LC_NUMERIC handling, and can be
used on systems lacking nl_langinfo.
|
|
|
|
|
|
|
|
|
| |
The comments say that a bunch of tests were disabled due to the poor
support of nl_langinfo() at the time, 2001. I haven't seen these issues
lately, and so am reinstating many of the tests, using the modern
Test::More that the rest of the file in the meantime had been updated to
use. The tests that weren't reinstated were because results for them
may vary by platform.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions depend on C library functions which have undefined
behaviour when passed NULL pointers, even when passed a zero 'n' value.
Some compilers use this information, ie. assume the pointers are
non-NULL when optimizing any following code, so we do need to
prevent such unguarded calls.
My initial thought was to add conditionals to each macro to skip the
call to the library function when n is zero, but this adds a cost to
every use of these macros, even when the n value is always true.
So instead I added asserts() which will give us a much more visible
indicator of such broken code and revealed the pp_caller and Glob.xs
issues also patched here.
|
| |
|
|
|
|
|
| |
I need this in order to fix bug #131883. Since it has a bit of
churn, I’m putting it in a separate commit.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
| |
This fixes a warning message for EBCDIC. The native character set is
different than Unicode, and needs special handling. I earlier tried to
save an #ifdef, but the resulting warning was hard to test right, and
that helped convince me that it would be confusing to anyone trying to
make sense of the message. So, in goes the #ifdef.
|
|
|
|
|
|
|
|
| |
When the len field of a REGEXP isn't usurped, display it (it used to
always be skipped for REGEXPs).
When it's usurped by a PVLV to point to a 'struct regexp', display it as
a pointer.
|
|
|
|
|
| |
There was a typo in one test, and in the other, the code point is output
as Unicode, not native.
|
|
|
|
|
| |
Perl-extended UTF-8 begins at a different code point on EBCDIC
platforms.
|
|
|
|
|
|
|
| |
OP_RV2AV already has one; its not clear why OP_RV2HV didn't.
Having one means that in scalar context it can return an int value
without having to create a mortal. Ditto when its doing 'keys %h' via
OPpRV2HV_ISKEYS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In something like
if (keys %h) { ... }
the 'keys %h' is implemented as the op sequences
gv[*h] s
rv2hv lKRM/1
keys[t2] sK/1
or
padhv[%h:1,6] lRM
keys[t2] sK/1
It turns out that (%h) in scalar and void context now behaves very
similarly to (keys %h) (except that it reset the iterator), so in these
cases, convert the two ops
rv2hv/padhv, keys
into the single op
rv2hv/padhv
with a private flag indicating that the op is handling the 'keys' action
by itself.
As well as one less op to execute, this brings the boolean-context
optimisation already present in padhv/rv2sv to keys. So
if (keys %h) { ... }
is no longer slower than
if (%h) { ... }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit v5.17.5-99-g8d919b0 stopped SVt_REGEXP SVs (and PVLVs acting as
regexes) from having the POK and pPOK flags set. This made things like
SvOK() and SvTRUE() slower, because as well as the quick single test for
any I/N/P/R flags, SvOK() also has to test for
(SvTYPE(sv) == SVt_REGEXP
|| (SvFLAGS(sv) & (SVTYPEMASK|SVp_POK|SVpgv_GP|SVf_FAKE))
== (SVt_PVLV|SVf_FAKE))
This commit fixes the issue fixed by g8d919b0 in a slightly different way,
which is less invasive and allows the POK flag.
Background:
PVLV are basically PVMGs with a few extra fields. They are intended to
be a superset of all scalar types, so any scalar value can be assigned
to a PVLV SV.
However, once REGEXPs were made into first-class scalar SVs, this
assumption broke - there are a whole bunch of fields in a regex SV body
which can't be copied to to a PVLV. So this broke:
sub f {
my $r = qr/abc/; # $r is reference to an SVt_REGEXP
$_[0] = $$r;
}
f($h{foo}); # the hash access is deferred - a temporary PVLV is
# passed instead
The basic idea behind the g8d919b0 fix was, for an LV-acting-as-regex,
to attach both a PVLV body and a regex body to the SV head. This commit
keeps this basic concept; it just changes how the extra body is attached.
The original fix changed SVt_REGEXP SVs so that sv.sv_u.svu_pv no longer
pointed to the regexp's string representation; instead this pointer was
stored in a union made out of the xpv_len field. Doing this necessitated
not turning the POK flag on for any REGEXP SVs.
This freed up the sv_u to point to the regex body, while the sv_any field
could continue to point to the PVLV body. An ReANY() macro was introduced
that returned the sv_u field rather than the sv_any field.
This commit changes it so that instead, on regexp SVs (and LV-as-regexp
SVs), sv_u always points to the string buffer (so they can have POK set
again), but on specifically LV-as-regex SVs, the xpv_len_u union of the
PVLV body points to the regexp body.
This means that SVt_REGEXP SVs are now completely "normal" again,
and SVt_PVLV SVs are normal except in the one case where they hold a
regex, in which case rather than storing the string buffer's length, the
PVLV body stores a pointer to the regex body.
|
| |
|
|
|
|
|
|
|
|
| |
Per perlpolicy, modules need to be deprecated for at least one stable
release before removal.
This reverts commits ecfa068aa0dab432bfdef423766b665be127ef77 and
6be75e63260512c636a5bdc72bbf4981a37bad7d.
|
|
|
|
|
|
|
|
|
|
| |
It continues to exist as a CPAN distribution.
Increment $B::Terse::VERSION due to change in POD.
Remove internal links to B::Debug within two .pod files.
For: RT #130410
|
| |
|
| |
|