summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* z/OS ASCII Enablement: Manage untagged header errno.h by copy & tagMike Fulton2022-01-181-2/+6
| | | | | | | The system headers on z/OS are in EBCDIC, but are untagged. The bi-modal build requires that files be tagged correctly so this patch copies the errno.h file (which may be mounted on a read-only file system) to a local file and then tags it as IBM-1047 (EBCDIC) so that it can be processed properly. The longer-term fix for this may be to have z/OS tag header files as EBCDIC, although this would not be something Perl could rely on for several years.
* Pod::Html: improve all testsMichiel Beijen2022-01-0419-62/+61
| | | | | | | "use warnings;" in all tests. Remove emacs identifiers. Change tabs to spaces in tests. For: https://github.com/Perl/perl5/pull/19304
* Hash::Util::FieldHash: improve test suiteMichiel Beijen2022-01-048-89/+52
| | | | | | | | | - do not count tests: - use done_testing - put tests requiring threading in their own subtests so we can skip_all - smaller improvements: use strict & warnings everywhere, tabs >> spaces
* Replace bareword filehandle with a lexical scalar:Sawyer X2021-12-281-9/+11
| | | | | | | | | Bareword filehandles are bad and this module should really remove this one. I'm also bumping the version to a stable one because why not. For: https://github.com/Perl/perl5/pull/19302
* Change pack U behavior for EBCDICKarl Williamson2021-12-281-2/+0
| | | | | | | | | | This effectively reverts 3ece276e6c0. It turns out this was a bad idea to make U mean the non-native official Unicode code points. It may seem to make sense to do so, but broke multiple CPAN modules which were using U the previous way. This commit has no effect on ASCII-platform functioning.
* use is_deeply instead of eq_ Test::More functionsMichiel Beijen2021-12-244-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add last-resort implementation for POSIX::FLT_ROUNDS.TAKAI Kousuke2021-12-242-1/+72
| | | | | | | | 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 is now an XS function rather than a constantTAKAI Kousuke2021-12-243-4/+25
| | | | | | 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()).
* Bump version number of ext/POSIXKarl Williamson2021-12-241-1/+1
|
* Use builtin::reftype in ext/Paul "LeoNerd" Evans2021-12-142-4/+4
|
* Use builtin::reftype/refaddr in .t filesPaul "LeoNerd" Evans2021-12-082-11/+6
|
* Use builtin::weaken() in .t files in lib/ + ext/Paul "LeoNerd" Evans2021-12-083-3/+2
|
* Add builtin::blessed, refaddr and reftypePaul "LeoNerd" Evans2021-12-081-0/+1
|
* Add builtin:: funcs for handling weakrefsPaul "LeoNerd" Evans2021-12-041-0/+1
| | | | | Also, ensure that B::Deparse understands the OA_TARGMY optimisation of OP_ISBOOL
* Direct optree implementations of builtin:: functionsPaul "LeoNerd" Evans2021-12-011-1/+3
| | | | | | Turn builtin::true/false into OP_CONSTs Add a dedicated OP_ISBOOL, make an efficient op version of builtin::isbool()
* Remove AT&T UWIN supportDagfinn Ilmari Mannsåker2021-11-023-5/+4
| | | | | UWIN is a UNIX compatibility layer for Windows. It was last released in 2012 and has been superseded by Cygwin these days.
* Remove DOS/DJGPP supportDagfinn Ilmari Mannsåker2021-11-027-13/+10
| | | | | | 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.
* bump $GDBM_File::VERSIONTony Cook2021-11-021-1/+1
|
* gdbm: Define error codes; provide the global $gdbm_errno variable.Sergey Poznyakoff2021-11-023-11/+284
| | | | | | | | | | | * 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().
* Fix the build and tests when NODEFAULT_SHAREKEYS is definedNicholas Clark2021-10-202-0/+9
| | | | | Defining this macro causes newHV() to create hashes without shared hash key scalars. The default is that hashes are created with shared hash keys.
* B::Concise now handles n-at-a-time for.Nicholas Clark2021-10-152-3/+134
|
* Tests for existing for loop optrees.Nicholas Clark2021-10-151-0/+186
|
* GDBM_File: Implement crash-tolerance and export/import functions.Sergey Poznyakoff2021-10-145-58/+659
| | | | | | | | | | | | | | | | | * 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.
* Rename HE_SVSLOT to HE_ARENA_ROOT_IXNicholas Clark2021-10-112-4/+4
| | | | | | The longer name more accurately reflects what the constant refers to. Correct the comments describing how some arena roots are re-used.
* Better email address for Perl 5 PortersJames E Keenan2021-10-091-1/+1
|
* Send bug reports to GitHubJames E Keenan2021-10-091-7/+6
| | | | | Mail to 'perlbug@perl.org' now simply triggers a response redirecting sender there.
* Remove NetWare supportDagfinn Ilmari Mannsåker2021-10-0813-65/+30
| | | | The build has been broken since 2009.
* Nothing changed in SIGINFO for OpenBSD 7.0Andrew Hewus Fresh2021-09-211-1/+1
| | | | | We'll check back in five years for OpenBSD 8.0 unless someone notices a fix before then.
* Update comment in POSIX::import()Olaf Alders2021-09-201-2/+2
| | | | | This removes the use of grandfather as a verb. See #18830 for initial discussion.
* ext/B/t/o.t shouldn't generate the same test module each run.Nicholas Clark2021-09-162-34/+15
| | | | | Extract its test module B::success into a real file, and eliminate lots of runtime path creation, file creation and file deletion complexity.
* Remove all "configured without perlio" test SKIPs from ext/PerlIO-*Nicholas Clark2021-09-165-22/+3
| | | | Also fix one skip that should have been for B, not PerlIO.
* Remove former SKIP blocks in ext/B/t/concise.t and re-indentNicholas Clark2021-09-161-204/+200
|
* Remove all "configured without perlio" test SKIPs from ext/BNicholas Clark2021-09-1614-88/+6
| | | | | | | | | | | | 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.
* Avoid a use-after-free deleting 8-bit keys from stashesNicholas Clark2021-09-161-0/+19
| | | | | | | | | | | | | 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.
* Test SvIsBOOL() using XS::APItestPaul "LeoNerd" Evans2021-09-153-0/+91
| | | | | Copy the Scalar::Util::isbool() tests into XS-APItest so we can avoid relying on Scalar::Util just to check core functionality
* test and fix using T_CVREF_REFCOUNT as an output parameterTony Cook2021-09-133-1/+16
|
* test and fix using T_AVREF_REFCOUNT as an output parameterTony Cook2021-09-133-1/+16
|
* test and fix using T_HVREF_REFCOUNT as an output parameterTony Cook2021-09-133-1/+16
|
* test and fix using T_SVREF_REFCOUNT as an output parameterTony Cook2021-09-133-1/+15
|
* bump $XS::Typemap::VERSIONTony Cook2021-09-131-1/+1
|
* test and fix using T_SV as an OUTPUT parameterTony Cook2021-09-133-1/+13
|
* Add SvIsBOOL() macro to test for SVs being boolean-intentPaul "LeoNerd" Evans2021-09-105-4/+28
| | | | | | | | | | | 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
* APItest.xs: remove unneeded SvPV_force_nolen()David Mitchell2021-09-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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"
* Test Devel::Peek with tied hashesNicholas Clark2021-09-031-1/+33
|
* Exercise Pod::Html::Util::html_escape on Title elementJames E Keenan2021-09-012-3/+3
| | | | For: https://github.com/Perl/perl5/issues/18838
* Test that mg_copy is called only when expected.Nicholas Clark2021-08-282-3/+72
| | | | | | | | | | | | 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
* Unicode tests should be in XS::APItest, not XS::APItest::Magic.Nicholas Clark2021-08-281-9/+2
| | | | | | | | | | | | 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.
* Use new sv_setrv_noinc() in Devel::PeekPaul "LeoNerd" Evans2021-08-252-4/+2
|
* Create `defer` syntax and `OP_PUSHDEFER` opcodePaul "LeoNerd" Evans2021-08-251-0/+2
| | | | | | | | | | | | | | | 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.
* Hash::Util::FieldHash fix_trigger can pre-size the hash before use.Nicholas Clark2021-08-232-3/+3
| | | | | This is only called by CLONE (and hence only matters for ithreads), but it's an improvement, and small and self-contained.