| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the eq_set, eq_hash, and eq_array functions in Test::More are
discouraged to use, and is_deeply is recommended. Ref:
https://metacpan.org/pod/Test::More#Discouraged-comparison-functions
The reason for this is that, if the tests fail, is_deeply has much
better diagnostics.
The other thing is that is_deeply is a test function directly, where
eq_hash and such need to be wrapped inside ok(). This is easy to forget
-- proof of this is in Benchmark.t, where we had this code, that did not
test anything:
eq_set([keys %$got], [qw(Foo Bar Baz)], 'should be exactly three objects');
It is now replaced by:
is_deeply([sort keys %$got], [sort qw(Foo Bar Baz)], 'should be exactly three objects');
this commit replaces all usage of eq_set, eq_hash, and eq_array in lib/
and ext/ for tests that use Test::More.
One small exception is where a negated test is used; Test::More does not
have is_not_deeply() or such. Test2 has `isnt()` for this, but that is
not in core. In those cases, we still keep using the eq_ operators.
|
|
|
|
|
|
|
|
| |
POSIX::FLT_ROUNDS now emulates (more) standard behavior that
reflects the current rounding mode set by fesetround(),
even when compiled with GCC whose FLT_ROUNDS is wrongly fixed to 1.
Also add tests for this.
|
|
|
|
|
|
| |
POSIX::FLT_ROUNDS used to be an NV constant, but C FLT_ROUNDS is
actually an integer and not a constant (C99 seems to say that
it reflects the current rounding mode set by fesetround()).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also, ensure that B::Deparse understands the OA_TARGMY optimisation of
OP_ISBOOL
|
|
|
|
|
|
| |
Turn builtin::true/false into OP_CONSTs
Add a dedicated OP_ISBOOL, make an efficient op version of builtin::isbool()
|
|
|
|
|
| |
UWIN is a UNIX compatibility layer for Windows. It was last released
in 2012 and has been superseded by Cygwin these days.
|
|
|
|
|
|
| |
DJGPP is a port of the GNU toolchain to 32-bit x86 systems running DOS.
The last known attempt to build Perl on it was on 5.20, which only got
as far as building miniperl.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* ext/GDBM_File/GDBM_File.pm: Export gdbm error codes.
Improve documentation.
* ext/GDBM_File/GDBM_File.xs (BOOT): Define the GDBM_File::gdbm_errno
variable.
(gdbm_errno): Return a value usable both in numeric and string
contexts.
* ext/GDBM_File/Makefile.PL: Define gdbm error codes.
* Document GDBM_* constants used with tie().
|
|
|
|
|
| |
Defining this macro causes newHV() to create hashes without shared hash key
scalars. The default is that hashes are created with shared hash keys.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ext/GDBM_File/Makefile.PL: Register new constants: gdbm_open
flags and return values for gdbm_latest_snapshot.
* ext/GDBM_File/GDBM_File.pm: Update documentation.
Export new constants.
Raise version to 1.21.
* ext/GDBM_File/GDBM_File.xs (dbcroak): Include system error
infomation, when appropriate.
(gdbm_syserrno): Return a meaningful value if not_here.
(gdbm_dump, gdbm_load, gdbm_convert)
(gdbm_failure_atomic, gdbm_latest_snapshot)
(gdbm_crash_tolerance_status): New functions.
* ext/GDBM_File/t/dump.t: New testcase.
* ext/GDBM_File/t/snapshot.t: New testcase.
* MANIFEST: List new files.
|
|
|
|
|
|
| |
The longer name more accurately reflects what the constant refers to.
Correct the comments describing how some arena roots are re-used.
|
| |
|
|
|
|
|
| |
Mail to 'perlbug@perl.org' now simply triggers a response redirecting
sender there.
|
|
|
|
| |
The build has been broken since 2009.
|
|
|
|
|
| |
We'll check back in five years for OpenBSD 8.0 unless someone notices a
fix before then.
|
|
|
|
|
| |
This removes the use of grandfather as a verb. See #18830 for initial
discussion.
|
|
|
|
|
| |
Extract its test module B::success into a real file, and eliminate lots
of runtime path creation, file creation and file deletion complexity.
|
|
|
|
| |
Also fix one skip that should have been for B, not PerlIO.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's not been possible to build perl without perlio since v5.16.0
Also remove comments relating to code fixups that were removed in Oct 2006
by commit ab7e0f544dbf50e3:
[patch] simplify optree test support
Message-ID: <4545220A.6060500@gmail.com>
Remove redundant `use Config;`s, and correct one (intended) %Config::Config
lookup where Config was only required, and hence %Config was not imported.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code path only affects symbol tables, and can't be reached by regular
Perl code. It is only reachable using the XS API to delete a key from a
stash where the key was in the 8-bit range but passed in UTF-8 encoded.
This has been in the code since it was added in Oct 2010 by commit
35759254f69c7bfa:
Rename stashes when they move around
Also there is no need to call SvPV() on keysv in S_hv_delete_common() as
its caller has always already done this. This entire code is not KISS.
|
|
|
|
|
| |
Copy the Scalar::Util::isbool() tests into XS-APItest so we can avoid relying
on Scalar::Util just to check core functionality
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These are identified as being static shared COW strings whose string
buffer points directly at PL_Yes / PL_No
Define sv_setbool() and sv_setbool_mg() macros
Use sv_setbool() where appropriate
Have sv_dump() annotate when an SV's PV buffer is one of the PL_(Yes|No) special booleans
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The two API test wrappers utf16_to_utf8_reversed() and
utf8_to_utf16(_reversed() included a call to SvPV_force_nolen(), because
the underlying functions in utf8.c which they were wrapping used to
modify the src buffer.
However since v5.35.2-236-g5fd26678bf, these functions no longer modify
the buffer, so the force is superfluous. So this commit removes force.
As a side-effect, this fixes a failure in
cd t; ./TEST -deparse ../ext/XS-APItest/t/utf16_to_utf8.t
because the test file has this line:
$utf16_of_U10302 = utf8_to_utf16_reversed(chr 0x10302);
which after a round trip through deparse becomes:
$utf16_of_U10302 = utf8_to_utf16_reversed("\x{10302}");
and it so happens that at compile time, the chr() form gets constant-
folded into a modifiable PADTMP string constant, which survives a call
to SvPV_force(), while the latter form is a pure read-only constant SV
which croaks with "Modification of a read-only value attempted"
|
| |
|
|
|
|
| |
For: https://github.com/Perl/perl5/issues/18838
|
|
|
|
|
|
|
|
|
|
|
|
| |
mg_copy is called for most operations on tied hashes, but not for `keys`.
This is externally observable behaviour, and Variable::Magic on CPAN has
a regression test that expects the current behaviour.
However, until this commit we had no tests in core that verified that the
current behaviour has not changed. Hence this new test.
Add the `static` keyword that was missing on several related variables and
functions in APItest.xs
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a `PACKAGE =` line to reset xsubpp's idea of the current package.
This didn't actually matter, as XS::APItest "imports" all symbols from its
subpackages into the top level package, but it seems cleaner to have the
symbols in the correct package. It also makes the generated code slightly
smaller, but this doesn't really matter as it's never installed.
Remove two #if/#endif pairs related to 5.8.x/5.9.x differences, that haven't
been need for over a decade, and fix a typo in an #endif.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds syntax `defer { BLOCK }` to create a deferred block; code that is
deferred until the scope exits. This syntax is guarded by
use feature 'defer';
Adds a new opcode, `OP_PUSHDEFER`, which is a LOGOP whose `op_other` field
gives the start of an optree to be deferred until scope exit. That op
pointer will be stored on the save stack and invoked as part of scope
unwind.
Included is support for `B::Deparse` to deparse the optree back into
syntax.
|
|
|
|
|
| |
This is only called by CLONE (and hence only matters for ithreads), but it's
an improvement, and small and self-contained.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously it was coding the increment "longhand", to avoid bugs in 5.6.x.
However, this XS code is now exclusively in the core, and 5.6.x is long
dead, so there's no need to work around it.
The "longhand" code might *seem* to be more efficient (due to inlining some
logic) but it still required at least one call to a function in sv.c
(so no real change in generated code size) and that call was for the
increment 0 => 1, so likely called a lot, so no significant change in total
calls made.
|
|
|
|
|
| |
As noted by @Grinnz in
https://github.com/Perl/perl5/pull/19050#discussion_r688968921.
|
|
|
|
| |
As noted by @Grinnz in https://github.com/Perl/perl5/pull/19050#discussion_r688969025.
|
|
|
|
|
| |
As noted by @Grinnz in
https://github.com/Perl/perl5/pull/19050#discussion_r688969538.
|
|
|
|
|
| |
This restores the thrust of c0ac28175b, which got zapped when resolving
merge conflicts.
|