summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Partially reinstate "Perl 6" instead of Raku for mro.pm and feature.pm:Sawyer X2020-05-301-1/+1
| | | | Changing those will cause a version change.
* Perl 6 -> Raku where appropriateH.Merijn Brand2020-05-301-1/+1
|
* Add quadmath to list of libraries.Peter John Acklam2020-05-251-0/+5
|
* Finally, bump version of File-GlobSawyer X2020-05-241-1/+1
|
* Fix File::Glob test:Sawyer X2020-05-241-8/+7
| | | | glob() should not exist. We check this with `->can('glob')`.
* Remove File::Glob::glob() entirelySawyer X2020-05-241-7/+0
|
* update POSIX POD to indicate that 'to(lower|upper)' were removedSergiy Borodych2020-05-231-0/+2
| | | | | | | ... since 5.26 They have been removed from the module by a65dc09f8c as leftovers, but the documentation was not updated
* Fix a bunch of repeated-word typosDagfinn Ilmari Mannsåker2020-05-227-9/+9
| | | | | Mostly in comments and docs, but some in diagnostic messages and one case of 'or die die'.
* B: Remove duplicate check for split op in walkoptree.tDagfinn Ilmari Mannsåker2020-05-221-2/+2
| | | | | | Commit 5012eebe558 eliminated the pushre op and did a blanket replacement of pushre with split, but missed that there was already a check for split in the loop. Eliminate the duplicate.
* Fix edge case test failure in ext/POSIX/t/mb.tDominic Hargreaves2020-04-111-7/+8
| | | | | | | | | | | | | | This new test fails in an environment where LANG is set to one thing and LC_ALL is set to another, and where LANG is set to a locale which is not installed in the environment in question. Such a test environment is arguably broken, but appears in common chroot setups such as Debian's sbuild tool where LANG is inherited from the parent environment, and LC_ALL is used to override it. (Committer rebased the patch) This fixes GH #17039
* ext/XS-APItest/APItest.xs - make allowances for big endian architecturesisyphus2020-04-021-14/+108
|
* APItest.pm: Bump version to 1.09Karl Williamson2020-04-021-1/+1
|
* Eliminate build-time warningZefram2020-03-302-2/+2
| | | | | | | Compiling with gcc7, for example, generated a '-Woverflow' warning with text 'overflow in implicit constant conversion'. For: https://github.com/Perl/perl5/issues/17664
* File-Glob/bsd_glob.c: use PerlEnv_getenv()Karl Williamson2020-03-181-2/+2
| | | | which has added protections beyond plain getenv()
* POSIX.xs: Never pass NULL to ctermid()Karl Williamson2020-03-182-3/+5
| | | | | | | | | | | | | | | | | Doing so can cause races. It is interesting that POSIX:ctermid() takes a parameter, but the pod doesn't indicate that it does. Prior to this commit the parameter was ignored if and only if the platform contains a ctermid_r() function, and hence on such platforms there was no possibility of a race here. The man pages I've seen for ctermid_r() indicate that it differs from regular ctermid() only in that it will fail if the input is NULL, and hence a race could occur if it didn't immediately fail. The situation prior to this commit wa that if you followed the pod on a non-ctermid_r() platform, and called this without a parameter, it would call ctermid with NULL, creating a potential race. This commit changes so that a race is never possible.
* Dynaloader: Add, fix commentsKarl Williamson2020-03-161-1/+13
|
* Bump IPC-Open3 versions to fix cmp_version.tNicolas R2020-03-132-2/+2
|
* IPC::Open2 and IPC::Open3 documentation updatesDan Book2020-03-132-50/+65
| | | | | | | | | | | * Remove direct usage of bareword filehandles and use lexical filehandles for the first example in each synopsis. * Add examples using STDIN and STDOUT filehandles, and examples using already open filehandles, with explicit examples of where these handles come from. * Declare variables with 'my' where appropriate and condense declarations inline. * Add comments in synopsis describing the purpose of each example. * Consistency of referencing synopsis variables from the description. * Replace ambiguous phrase 'null string' with 'empty string or undefined' which is also more correct here. * Add links to referenced CPAN modules and manpages. * Better describe the reason for using gensym in IPC::Open3 and how to use it.
* Add strict and warnings to some .PL filesNicolas R2020-03-131-1/+6
| | | | | use a convoluted incantation to be able to set 'use strict; use warnings' only for Perl > 5.6
* chained comparisonsZefram2020-03-121-1/+3
|
* use re qw(debug foo) should warnKarl Williamson2020-03-112-3/+14
| | | | Instead, foo was silently ignored
* ext/re/re.pm: Fix up setting debug option defaultsKarl Williamson2020-03-111-1/+13
| | | | This was not setting the defaults properly for 'debug', and 'Debug'
* Allow wildcard pattern debuggingKarl Williamson2020-03-052-7/+63
| | | | | | | | | | | | | | | | | | | | | | This fixes #17026 Patterns can have subpatterns since 5.30. These are processed when encountered, by suspending the main pattern compilation, compiling the subpattern, and then matching that against the set of all legal possibilities, which Perl knows about. Debugging info for the compilation portion of the subpattern was added by be8790133a0ce8fc67454e55e7849a47a0858d32, without fanfare. But, prior to this new commit, debugging info was not available for that matching portion of the compilation, except under DEBUGGING builds, with -Drv. This commit adds a new option to 'use re qw(Debug ...)', WILDCARD, to enable subpattern match debugging. Whatever other match debugging options have been turned on will show up when a wildcard subpattern is compiled iff WILDCARD is specified. The output of this may be voluminous, which is why you have to ask for it specifically. Or, the EXTRA option turns it on, along with several other things.
* bump $XS::APItest::VERSIONTony Cook2020-03-041-1/+1
|
* APItest: get a compile-time warning if IVdf doesn't match IV_MAXTony Cook2020-03-042-1/+24
| | | | | | | and similarly for UVuf/UV_MAX. This already warns in PPPort, but that's for testing PPPort, not the core.
* Fixup POSIX::mbtowc, wctombKarl Williamson2020-02-193-20/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit enhances these functions so that on threaded perls, they use mbrtowc and wcrtomb when available, making them thread safe. The substitution isn't completely transparent, as no effort is made to hide any differences in errno setting upon error. And there may be slight differences in edge case behavior on some platforms. This commit also changes the behaviors so that they take a scalar parameter instead of a char *, and this might be 'undef' or not be forceable into a valid PV. If not a PV, the functions initialize the shift state. Previously the shift state was always reinitialized with every call, which meant these could not work on locales with shift states. In addition, there were several issues in mbtowc and wctomb that this commit fixes. mbtowc and wctomb, when used, are now run with a semaphore. This avoids races if called at the same time in another thread. The returned wide character from mbtowc() could well have been garbage. The final parameter to mbtowc is now optional, as passing an SV allows us to determine the length without the need for an extra parameter. It is now used only to restrict the parsing of the string to shorter than the actual length. wctomb would segfault if the string parameter was shared or hadn't been pre-allocated with a string of sufficient length to hold the result.
* POSIX::mblen: Make length parameter optionalKarl Williamson2020-02-193-5/+9
| | | | Now that the typemap is an SV, we can access the length from that.
* POSIX::mblen() Make thread-safe; allow shift state controlKarl Williamson2020-02-193-33/+80
| | | | | | | | | | | | | | | | | | | This commit changes the behavior so that it takes a scalar parameter instead of a char *, and thus might not be forceable into a valid PV. When not a PV, the shift state is reinitialized, like calling mblen with a NULL first parameter. Previously the shift state was always reinitialized with every call, which meant this could not work on locales with shift states. This commit also changes to use mbrlen() on threaded perls transparently (mostly), when available, to achieve thread-safe operation. It is not completely transparent because mbrlen (under the very rare stateful locales) returns a different value when it's resetting the shift state. It also may set errno differently upon errors, and no effort is made to hide that difference. Also mbrlen on some platforms can handle partial characters. [perl #133928] showed that someone was having trouble with shift states.
* Remove claimed support for mbstowcs, wcstombcKarl Williamson2020-02-123-27/+1
| | | | | | | As noted in perldelta, these functions could not have ever worked, and there is no demand for them, hence no reason to make them work. This fixes GH #17388
* Reword pod2html crossref err msgs; show only if $verboseMarc Green2020-02-112-12/+21
| | | | Fixes #11860
* B::perlstring - add support for \e (Fix #17526)Yves Orton2020-02-043-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | In daf6caf1ef25ff48f871fa1e53adcefc11bf1d08 karl made pv_uni_display() use the available mnemonic escapes instead of using \x{} style escapes. This broke B::perlstring() which has an exclusion list of such escapes to passthrough, and it did not know about \e, so it produced "\\e" instead of "\e", which of course does not round trip. This in turn broke Sub::Quote, which in turn breaks Moo, which breaks a lot of stuff. :-) Unfortunately B::perlstring() had no tests to detect this, so we only found out when we got a BBC report that happened to also ticklet this bug. This patch adds 'e' to the exclusion list, and also adds tests to see that the the first 1024 unicode codepoints and all 255 non-unicode codepoints can round trip through B::perlstring(). This should resolve #17526 and indirectly help us close #17245. With this patch we bump B.pm to v1.80
* XS-APItest: add tests for U8TO64_LE() and other hashing macros and codeYves Orton2020-01-243-1/+717
| | | | | | | | | | | | | | | | | | Includes testing siphash24 and siphash13 properly, especially testing against the SipHash 2-4 reference test vector, see https://131002.net/siphash/siphash24.c See also #17244 where we originally discovered there were no tests for the internals of the hashing code and that because of it we let slip in a very broken patch to the code. Thanks to James E Keenan, Tony Cook and Hugo Van der Sanden for support putting this together. XS-APItest: fixup issues with # directives for some reason the indentation of the #if clauses broke things under some builds, but not all. Possibly a ccache issue.
* pv_uni_display: Use common fcn; \b mnemonicKarl Williamson2020-01-233-3/+2
| | | | | | | | | | | This removes the (almost) duplicate code in this function to display mnemonics for control characters that have them. The reason the two pieces of code aren't precisely the same is that the other function also uses \b as a mnemonic for backspace. Using all possible mnemonics is desirable, so a flag is added for pv_uni_display to now use \b. This is now by default enabled in double-quoted strings, but not regex patterns (as \b there means something quite different except in character classes). B.pm is changed to expect \b.
* Warn on too high a code point if portable warn enabledKarl Williamson2020-01-231-4/+11
| | | | | | | | | "use warnings 'portable'" is supposed to warn if a value won't fit on a 32 bit platform. For the UTF-8 conversion functions it wasn't. This is still overridden if the flags to these functions call for no warnings to be generated, but this commit changes it so that if the portable category is enabled, but not the non_unicode category, warnings are generated for the code points that won't work on a 32-bit platform.
* error check the calls to sigaddset in POSIX::SigSet->newTony Cook2020-01-063-2/+27
| | | | | | | | | | Coverity complained that SvIV() could return negative numbers, but doesn't complain about the similar call in the sigaddset() method, which is error checked. So error check sigaddset() and throw an error if it fails. CID 244386.
* utf8.c: Change parameter types of internal fcnsKarl Williamson2020-01-031-1/+1
| | | | | These generated warnings on certain platform builds, and weren't the best types for the purpose anyway.
* OP_MULTIDEREF: avoid trailing null aux byteDavid Mitchell2020-01-021-0/+14
| | | | | | | | | | | | | | | | | | | | | | | GH #17301 The aux array in an OP_MULTIDEREF op consists of an action word containing as many actions as will fit shifted together, followed by words containing the arguments for those actions. Then another action word, and so on. The code in S_maybe_multideref() which creates those ops was reserving a new slot in the aux array for a new action word when the old one became full. If it then turned out that no more actions were needed, this extra slot was harmlessly filled with a zero. However it turns out that the B::UNOP_AUX::aux_list() introspection method would, under those circumstances, claim to have returned one more SV on the stack than it actually had, leading to SEGVs etc. I could have fixed aux_list() directly to cope with an extra null word, but instead I did the more general fix of ensuring that S_maybe_multideref() never adds an extra null word in the first place. The test added to ext/B/t/b.t fails before this commit; the new test in lib/B/Deparse.t doesn't, but was added for completeness.
* Update documentation for hash_seed()Slaven Rezic2019-12-301-2/+2
| | | | | | Update $VERSION. For: https://github.com/Perl/perl5/issues/17399
* POSIX.xs: Fix typo displayed when fcn doesn't existKarl Williamson2019-12-292-2/+2
|
* APItest.xs: fix subsignature testDavid Mitchell2019-12-252-4/+6
| | | | | | | | | | | | | | | THX_parse_keyword_subsignature() in APItest.xs does, amongst other things, return a string representation of an OP_ARGCHECK op. My commit v5.31.4-13-gf417cfa906 made the data attached to that op be a struct rather than an array of IVs, but missed updating APItest.xs, which this commit now amends. This may or may not fix GH #17202 where the returned value of the slurpy field was wrong on big-endian systems. This is presumably due to (char)aux[2] not being the same as aux->slurpy where one is an IV and the other is a char field.
* POSIX.pod: Clarify strtod() textKarl Williamson2019-12-231-2/+3
|
* POSIX.pod: Clarify setlocale() textKarl Williamson2019-12-231-3/+4
|
* POSIX.pod: Clarify localeconv() textKarl Williamson2019-12-231-3/+5
|
* POSIX.pod: Fix typoKarl Williamson2019-12-231-1/+1
|
* POSIX.pod: Fix typoKarl Williamson2019-12-201-1/+1
|
* POSIX.pod: Update setlocale() docsKarl Williamson2019-12-201-9/+15
| | | | This should have been updated in 5.28, but was overlooked.
* Add memCHRs() macro and use itKarl Williamson2019-12-184-5/+5
| | | | | | | This replaces strchr("list", c) calls throughout the core. They don't work properly when 'c' is a NUL, returning the position of the terminating NUL in "list" instead of failure. This could lead to segfaults or even security issues.
* Revert "Move PL_check to the interp vars to fix threading issues"Tony Cook2019-12-163-80/+0
| | | | | and the associated commits, at least until a way to make wrap_op_checker() work is available.
* un-TODO pl_check.t and remove io/handle.tTony Cook2019-12-121-5/+1
| | | | | | | io/handle.t depends on IO::Handle using the PL_check hack, but Nicholas's back portable fix no longer uses that Fix threaded perl detection, thanks to James Keenan.
* provide a test for the PL_check mis-behaviourTony Cook2019-12-123-0/+84
| | | | | Nicholas Clark's fix for IO makes the test in niner's patch meaningless, so test it separately.