summaryrefslogtreecommitdiff
path: root/dist/Devel-PPPort/parts
Commit message (Collapse)AuthorAgeFilesLines
* Devel-PPPort - deal with signed klen in check_HeUTF8Yves Orton2023-03-291-2/+2
| | | | | | Some of the HV logic uses a negative key length to indicate utf8 keys, and this logic was using an unsigned keylength, which obviously does not work
* regen/embed.pl - change _aDEPTH and _pDEPTH to not have a leading underbarYves Orton2023-03-191-1/+1
| | | | | | | | | | | | | | The leading underbar is reserved by C. These defines are debugging only "recursion" depth related counters injected into the function macro wrappers when a function is marked as 'W', much the same way that aTHX_ and pTHX_ are when building under threaded builds. The functions are expected to incremented the depth parameter themselves. Note that "recursion" is quoted above because in practice currently they are only used by the regex engine when recursing virtually, and they do not relate to true C stack related recursion. (But they could be used for tracking C level recursion under debugging if someone needed it.)
* Mark vtbl argument in sv_unmagicext const in PPPort as wellLeon Timmermans2023-03-182-2/+2
|
* Devel-PPPort - silence maybe-uninitialized warnings on gcc-12Yves Orton2023-02-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC-12 seems to have a propensity to warning about maybe-uninitialized variables a lot more than it should. Most of the cases I have looked into it turns out to be a false positive, but at the same time, it is pretty simple to fix this kind of thing, so just fix it so the darn thing will shut up. This one just initializes some variables to NULL at the start of a test function. Fixes the following (slightly elided) warning. gcc-12 -c ... -Og -g ... -W -Wall RealPPPort.c In file included from ../../perl.h:6197, from RealPPPort.xs:31: ../../embed.h: In function ‘XS_Devel__PPPort_OpSIBLING_tests’: ../../embed.h:461:49: warning: ‘lastkid’ may be used uninitialized [-Wmaybe-uninitialized] 461 | # define op_free(a) Perl_op_free(aTHX_ a) ^~~~~~~~~~~~ RealPPPort.xs:1741:21: note: ‘lastkid’ was declared here 1741 | OP *lastkid; | ^~~~~~~ Fixes Github Issue #20816
* Devel-PPPort: fix STMT_START and STMT_END to not warn on clangGraham Knop2022-11-091-7/+2
| | | | | | | | | | | | | | | Since 7169efc77525df70484a824bff4ceebd1fafc760, perl's core STMT_START and STMT_END macros no longer try to use brace groups, due to the warnings they can generate and their very limited usefulness. That commit also changed Devel::PPPort to remove the use of brace groups in STMT_START/STMT_END. That led to errors in older perls, so it was partly reverted in e08ee3cb66f362c4901846a46014cfdfcd60326c. Since then, various other macros have been improved to properly work with brace groups enabled or disabled. We can now remove the brace group using variant of STMT_START/STMT_END, which will silence the warnings from clang.
* Devel-PPPort: use inline function for croak_sv without brace groupsGraham Knop2022-11-091-11/+12
| | | | | | | | | | The macro for croak_sv when brace groups are not enabled uses STMT_START/STMT_END. This works when used as a statement, but would break if used as part of an expression. To resolve this, change that macro to use a function. As a static inline function with a namespaced name, it shouldn't cause problems with namespace pollution.
* regcomp.c - rename NEXTOPER to REGNODE_AFTER and related logicYves Orton2022-08-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is really easy to get confused about the difference between NEXTOPER() and regnext() of a regnode. The two concepts are related, similar, but importantly distinct. NEXTOPER() is also defined in such a way that it is easy to abuse and misunderstand and encourages producing code that is fragile to larger change, effectively "baking in" assumptions to the code that are difficult to discover by searching. Changing the type and storage requirements of a regnode may break things in subtle and hard to debug ways. An example of how NEXTOPER() is problematic is that this: NEXTOPER(NEXTOPER(branch)) does not mean "find the second node after the branch node", it means "jump forward by a regnode which happens to be two regnodes large". In other words NEXTOPER is just a fancy way of writing "node+1". This patch replaces NEXTOPER() with three new macros: REGNODE_AFTER_dynamic(node) REGNODE_AFTER_opcode(node,op) REGNODE_AFTER_type(node,tregnode_OPNAME) The first is the most generic case, it jumps forward by the size of the node, and determines that size by consulting OP(node). The second is where you have already extracted OP(node), and the third is where you know the actual structure that you want to jump forward by. Every regnode type has a corresponding type, which is known at compile time, so using the third will produce the most efficient code. However in many cases the code operates on one of several types, whose size may be the same now, but may change in the future, in which case one of the other forms is preferred. The run time logic in regexec.c should probably only use the REGNODE_AFTER_type() interface. Note that there is also a REGNODE_BEFORE() which replaces PREVOPER(), which is used in a specific piece of legacy logic but should not be used otherwise. It is not safe to go backwards from an arbitrary node, we simply have no way to know how large the previous node is and thus where it starts. This patch includes some logic that validates assumptions during DEBUG mode which should catch errors from resizing regnodes. After this patch changing the size of an existing regnode should be relatively safe and errors related to sizing should trigger assertion fails. This patch includes changes to perlreguts.pod to explain this stuff better.
* Update Devel::PPPort to 3.68Sawyer X2022-03-193-8/+12
|
* Update Devel-PPPort to match 3.67Nicolas R2022-03-106-19/+81
|
* Update Devel-PPPort to match last 3.66 releaseNicolas R2022-03-1020-55/+173
|
* Update Devel-PPPort to 3.64reneeb2022-02-20102-332/+861
|
* Devel::PPPort: Fix STMT_START { ... } STMT_ENDKarl Williamson2021-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes up 6d66b125bb339b62c0d8d4283d3fe576795764ce so that the Devel::PPPort portion works on all supported Perls. Basically, we have to preserve the pre-existing behavior for all Perls that still have VOIDFLAGS, which was removed by: Author: Nicholas Clark nick@ccl4.org Date: Wed Sep 11 11:54:42 2013 +0200 Eliminate the only use of VOIDFLAGS, as part of STMT_START in perl.h STMT_START has used VOIDFLAGS as part of its conditional compilation since it was added by commit 728e280 (March 1996). The code originally read: /* Now which other defined()s do we need here ??? */ Since then it has been amended to avoid entering that definition for GCC on Solaris. Given that all current Solaris compilers are C89 conformant, VOIDFLAGS will always be true (actually 15), so the test is redundant. Even back in 1996, it's possible that VOIDFLAGS was always non-zero on SunOS, rendering the test obsolete from the start. Spotted by Brian Fraser, and extracted from a larger patch of his.
* Sync Devel::PPPort with CPAN version 3.63Karl Williamson2021-07-18119-951/+1999
|
* Partially Revert "skip using gcc brace groups for STMT_START/END"Karl Williamson2021-07-181-2/+7
| | | | | | | This reverts the portion of commit 6d66b125bb339b62c0d8d4283d3fe576795764ce that modified Devel::PPPort. It turns out that it broke that module when the module is run on Perl 5.13.0 (and presumably any earlier Perl).
* skip using gcc brace groups for STMT_START/ENDTony Cook2021-07-151-7/+2
| | | | | | | | | | This warns (and warns a lot) on clang, and since these are documented to only work to make a single statement, so there's little value to allowing them to work in an expression. An alternative would be to disable GCC brace groups on clang, but these are used extensively in DEBUGGING builds to add extra checks in sv.h.
* ppport.h's utf8_to_uvchr_buf implementation misses a NULL check in one place.Nicholas Clark2021-05-221-1/+3
|
* Define PERL_ARGS_ASSERT_CROAK_XS_USAGE when setting croak_xs_usageJames E Keenan2021-02-161-3/+5
| | | | | | | | | | Apply patch already applied to Dual-Life/Devel-PPPort: https://github.com/Dual-Life/Devel-PPPort/pull/196.patch This is matching what's done in ExtUtils::ParseXS::Utilities and avoids need to redefine croak_xs_usage later. For: https://github.com/Perl/perl5/issues/18040
* Update Devel-PPPort to release 3.62Nicolas R2020-10-1918-51/+219
|
* Update Devel-PPPort to release 3.60Nicolas R2020-08-117-72/+97
| | | | | | This is mainly restoring the PERL_BCDVERSION macro. PERL_BCDVERSION is used by multiple CPAN distributions and should not have been renamed.
* Update Devel-PPPort to release 3.59Nicolas R2020-08-10221-1527/+7906
| | | | | Note that test files are not under file version control anymore as they are generated files.
* Devel-PPPort: Bump to upstream at 7180c297Nicolas R2020-08-0217-547/+637
| | | | | | | | | These changes from Devel-PPPort are adding support for Perl 7.0 and fixes the testsuite with a Perl 7.0.0 binary. We would have to publish a new version of Devel-PPPort.
* Update Devel-PPPort to CPAN version 3.57Chris 'BinGOs' Williams2020-02-0764-278/+646
| | | | | | | | | | | | | | | | [DELTA] 3.57 - 2020-01-31 * Fix eval_sv for Perl versions prior to 5.6.0 (Pali) * Fix t/ppphtest.t for Perl versions prior to 5.6.0 (Pali) * Fix compilation of sv_setsv_flags when GCC extensions are not present (Pali) * Fix SV_NOSTEAL on 5.7.2 (Karl Williamson) * Fix multiple unit test issues (Craig A. Berry, Karl Williamson, Pali) * Avoid generating warnings on early Perls (Karl Williamson) * Backport memCHRs (Karl Williamson) * Implement sv_setsv_flags() with SV_NOSTEAL and SV_GMAGIC flags for Perl versions < 5.7.3 (Pali) * Implement UTF8f format and its UTF8fARG macro (Pali)
* D:P: parts/inc/misc: Silence Wide char warningsKarl Williamson2019-11-221-0/+1
|
* D:P: Update parts/base, parts/todo to latestKarl Williamson2019-11-2218-65/+23
|
* D:P: parts/embed.fnc: Update to latest bleadKarl Williamson2019-11-221-91/+61
|
* D:P: PATCH: gh #156 sync_locale doesn't work in 5.20 maintKarl Williamson2019-11-221-2/+7
| | | | | It turns out that there was special code added in the 5.20 maint series that needed to be accounted for.
* D:P: parts/apidoc.fnc: Update to latest bleadKarl Williamson2019-11-221-0/+3
|
* D:P: Convert ok() to is()Karl Williamson2019-11-2231-388/+388
| | | | | | | | There are some ok() that need to remain so, but this converts all the ones that are really is() to be that. After this commit, the remaining ok() can have a test description added to them.
* D:P: Change to use modern skip functionalityKarl Williamson2019-11-2211-86/+37
| | | | | The new skip() has a count of tests. Previously you had to loop yourself.
* D:P: Convert to use modern Test functionsKarl Williamson2019-11-223-16/+15
| | | | | | | | | | | | | | | | | | | This commit copies much of test.pl from blead to replace the Test ones. These versions are much friendlier to use. Several .t files required minor changes to work with these. pv_tools.t was the only file using the old obsolete skip() functionality fully. The new version does not do a 'last SKIP', for compatibility. like and unlike were not ported because of the absence of qr// in perls this is supposed to work on. And the portions of test.pl that were copied also required a few minor changes to work back to 5.3.7. Not all the ported functionality is currently in used. It may be that changes will have to be made to it to get it to work; or will have to be deleted.
* D:P: fix mess.t failures when $0 contains backslashesTomasz Konojacki2019-11-221-43/+43
| | | | | | | | | This seems to happen only when Devel::PPPort was built with Visual C++ and nmake as a standalone distribution. perl/perl5@1ddd2f5fcd8802a45ffd773aec3af107f37613f6 had fixed that before, but the change was made only in the autogenerated test file and it was discarded when the tests were regenerated.
* UTF8_CHK_SKIP uses MIN() tooTomasz Konojacki2019-11-081-1/+2
| | | | This fixes compilation with Visual C++
* parts/inc/misc: Convert to use ivers()Karl Williamson2019-11-081-17/+17
| | | | | | | | | Doing this showed me a redundant test. I didn't have to take out the zeros, it just looks better without them. (cherry picked from commit 9e0e078a1aefa78df3322c87b01323862e05c397) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/inctools: ivers(): Add version string inputsKarl Williamson2019-11-081-2/+15
| | | | | (cherry picked from commit bb54da9a565f7fcf13708a69ed6a33a36bb32745) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/inctools: Add short synonym for int_parse_versionKarl Williamson2019-11-081-0/+5
| | | | | (cherry picked from commit 3df9d356984187e51559b28cd6653cfffef94bff) Signed-off-by: Nicolas R <atoomic@cpan.org>
* utf8_to_uvchr_buf() Return proper lengthKarl Williamson2019-11-081-1/+1
| | | | | | | | When input UTF-8 is 13 bytes, return 13, even on 32 bit machines where overflow happens at 7 UTF-8 bytes. (cherry picked from commit f379e2ee4277fc855a37b82c6c94294c4e0e8c8d) Signed-off-by: Nicolas R <atoomic@cpan.org>
* Regenerate after new backportingsKarl Williamson2019-11-0820-87/+93
| | | | | (cherry picked from commit 237f5af008eeb7e48fa94eb14952cc1f37d7807e) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/misc: Change version validity criteriaKarl Williamson2019-11-081-1/+1
| | | | | | | | I'm not sure why I think this is a good idea, but I know Unicode handling started in 5.6, and am converting to use that criterium (cherry picked from commit d69dce5eb7ab3ae39718aad250fcba2189773621) Signed-off-by: Nicolas R <atoomic@cpan.org>
* Backport isFOO_LC_utf8_safe()Karl Williamson2019-11-081-37/+286
| | | | | | | This also involves some test refactoring (cherry picked from commit 7149d3266cce3561c90c73f57ec932db73105311) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/misc: Backport some isFOO_LC macrosKarl Williamson2019-11-081-0/+7
| | | | | | | | | | | | | | | | A few of this class of macros did not go back very far. This makes a reasonable attempt to get things right, but very early versions may have some wrong answers, but unlikely. This was complicated by the fact that isascii() and isblank() may not be available on a given platform. So this just uses the plain non-locale version for those very early Perl versions. I didn't add tests. It is hard to portably test locales. The next commits will backport functions that call these and do have tests. (cherry picked from commit a8f88b13766d8f2820f5bba560bb282188124b34) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/misc: White-space onlyKarl Williamson2019-11-081-27/+27
| | | | | | | Mostly indenting a newly formed block (cherry picked from commit 820b22a12ec9783c819b7f2400201908bceed04d) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/misc: Generalize a testKarl Williamson2019-11-081-3/+6
| | | | | | | | The result of this commit is a loop that runs once; that will change in two commits from now, when it runs with different values (cherry picked from commit 1d9bacdd128c8dc51c3b54b05e9d112a39c25e4a) Signed-off-by: Nicolas R <atoomic@cpan.org>
* Backport toFOO_uvchr()Karl Williamson2019-11-081-3/+155
| | | | | (cherry picked from commit 1123d46ee9d608669383de3bf540882072690ad4) Signed-off-by: Nicolas R <atoomic@cpan.org>
* Backport isFOO_uvchr()Karl Williamson2019-11-081-5/+194
| | | | | (cherry picked from commit 9ae426cf5b257cb458fcf48427524a6aa4332cad) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/misc: Change internal macro nameKarl Williamson2019-11-081-4/+4
| | | | | | | | This is to distinguish it from a macro with similar intent about to be added. (cherry picked from commit cd875ece2bd9cf79a62016767589f8b5821293d6) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/misc: early toFOLD_utf8_safe() is toLOWERKarl Williamson2019-11-081-2/+1
| | | | | | | | On early perls, there was no distinction between fold and lowercase, so just call lower from fold. (cherry picked from commit 0450a74631276c933399241c46616508ce32c299) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/misc: Use hash and loop to generalize codeKarl Williamson2019-11-081-176/+97
| | | | | | | | | This converts the testing of certain tests that are nearly identical to use a loop with a hash to store the differences, leading to simpler, extensible code. (cherry picked from commit 14ec6258920f199e95c72891c23139f6ff10e511) Signed-off-by: Nicolas R <atoomic@cpan.org>
* Backport UTF8_MAXBYTES_CASEKarl Williamson2019-11-083-0/+9
| | | | | | | This constant was wrong in earlier perls. (cherry picked from commit 6e55485b5c4486d7883a50325a42a51dcca42ab8) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/misc: Fix EBCDIC bugKarl Williamson2019-11-081-1/+1
| | | | | | | We were double xlating the underscore (cherry picked from commit dc1ee4fcc8bc4d1f627c33228ab30432e57f0a9a) Signed-off-by: Nicolas R <atoomic@cpan.org>
* parts/inc/utf8: Refactor a little for clarityKarl Williamson2019-11-081-5/+4
| | | | | (cherry picked from commit eddcc8663f05c54bedd22e22242d751af34e61d3) Signed-off-by: Nicolas R <atoomic@cpan.org>