summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Provide ntohl, ntohs, htonl and htons no-op macros on big endian systems.Nicholas Clark2013-05-203-30/+9
| | | | | | | | | | | This means that there are always macros or functions for ntohl, ntohs, htonl and htons available, so eliminate use of HAS_NTOHL etc, and unconditionally compile the code that it was protecting. However, as code on CPAN is using these guard macros, define all of them in perl.h (Technically the 4 are not quite no-ops, as they truncate their values to 32 or 16 bits, to be consistent with the implementations for platforms which need re-ordering.)
* Provide vtohl, vtohs, htovl and htovs no-op macros on little endian systems.Nicholas Clark2013-05-203-21/+11
| | | | | | | | | | | This means that there are always macros or functions for vtohl, vtohs, htovl and htovs available, so eliminate HAS_VTOHL etc, and unconditionally compile the code that it was protecting. grep.cpan.me shows that no code on CPAN uses any of these macros. (Technically the 4 are not quite no-ops, as they truncate their values to 32 or 16 bits, to be consistent with the implementations for platforms which need re-ordering.)
* vtohl, vtohs, htovl and htovs are no-ops on 64 bit little endian systems.Nicholas Clark2013-05-201-1/+3
| | | | | | | Previously they were implemented as function calls on 64 bit little endian systems. Bit endian systems implemented them as byte-swapping macros. 32 little endian system didn't implement them at all. 32 and 64 bit little endian systems now behave identically.
* Eliminate the definitions for DO_BO_PACK_P and DO_BO_UNPACK_P.Nicholas Clark2013-05-201-10/+0
| | | | | Commit 07409e015252427f in April 2005 replaced all the uses of these two macros with DO_BO_PACK_PC and DO_BO_UNPACK_PC.
* Eliminate pre-5.9.x conditional code for PERL_PACK_CAN_SHRIEKSIGNNicholas Clark2013-05-203-87/+11
| | | | | | | PERL_PACK_CAN_SHRIEKSIGN has been unconditionally defined for versions 5.9.x and greater, and undefined for 5.8.x. As we are never going to need to port changes back to maint-5.8 any more, eliminate all the 5.8.x related code and the macro that supports it.
* Eliminate pre-5.9.x conditional code for PERL_PACK_CAN_BYTEORDERNicholas Clark2013-05-201-25/+0
| | | | | | | PERL_PACK_CAN_BYTEORDER has been unconditionally defined for versions 5.9.x and greater, and undefined for 5.8.x. As we are never going to need to port changes back to maint-5.8 any more, eliminate all the 5.8.x related code, and the macro that supports it.
* Merge the reworking of how genpacksizetables.pl is used.Nicholas Clark2013-05-205-256/+265
|\
| * Add regen/genpacksizetables.pl to t/porting/regen.tNicholas Clark2013-05-201-1/+1
| |
| * Move genpacksizetables.pl to regen/genpacksizetables.plNicholas Clark2013-05-203-2/+2
| |
| * Refactor genpacksizetables.pl to use regen/regen_lib.plNicholas Clark2013-05-202-5/+12
| |
| * Extract the generated packprops array into packsizetables.c.Nicholas Clark2013-05-203-249/+251
| | | | | | | | | | | | | | The C source is the output from genpacksizetables.pl Previously it was pasted into pp_pack.c LocalWords: packprops
| * Propagate a change from commit 1651fc447620d361 into genpacksizetables.pl.Nicholas Clark2013-05-201-1/+1
| | | | | | | | | | | | pp_pack.c contains a table generated by genpacksizetables.pl, pasted into the C source. The C source was updated by commit 1651fc447620d361 in April 2007, but the table used to generate the code was not.
| * genpacksizetables.pl: Correct comment typoKarl Williamson2013-05-201-1/+1
|/
* Change LIKELY() and UNLIKELY() to cast their first argument to a bool.Nicholas Clark2013-05-201-2/+2
| | | | | | | | | | | This avoids problems such as pointers being compared with the literal value 1. Suggested by Zefram. Note that this is technically a change of behaviour, as the macro EXPECT(), which they are both both wrappers for, returns its value, so they will now be returning TRUE or FALSE, rather than the actual value passed to them. However, all uses in the core and on CPAN are only within if() statements, so this should not make any difference in practice.
* handy.h: Change the error return of two macrosKarl Williamson2013-05-201-8/+8
| | | | | | | | | | These two undocumented macros returned the REPLACEMENT CHARACTER if the input was outside the Latin1 range. This was contrary to all other similar macros, which return their input if it is invalid. It caused warnings in some (dumber than average) compilers. These macros are undocumented; this changes the behavior only of illegal inputs to them.
* regcomp.c: Add commentKarl Williamson2013-05-201-1/+1
|
* utf8.c: White space only.Karl Williamson2013-05-201-4/+4
| | | | Indent in newly formed block
* fold_grind.t: Add testsKarl Williamson2013-05-201-5/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | fold-grind stresses the /i regex handling by reading the Unicode folding rules and creating tests for problematic cases, as well as some non-problematic ones. Because of the large number of tests generated, it otherwise avoids tests that it doesn't think are problematic. Problematic cases include those whose folds cross the ordinal 127/128 or 255/256 boundaries, along with other considerations. Until this commit, fold_grind failed to realize that even if the pair of characters currently being tested don't cross those boundaries, if their eventual folds do, this could be problematic. Suppose X and Y are both on the same side of the boundaries, and both fold to Z which is on another side. Then X and Y should be equivalent under /i even if the fold to Z is prohibited because of /aa or /l. fold_grind was overzealous in pruning such tests. The previous patch fixed bugs in handling such cases; and this patch fixes the tests to look for similar things that might possibly arise in the future. Interestingly, this bug came to light during porting to an EBCDIC platform. The reason is that because of the different collation order, fold_grind chose one of the buggy cases to test as one its non-problematic tests.
* Fix multi-char fold edge caseKarl Williamson2013-05-207-45/+148
| | | | | | | | | | | | | | | | | | | | | | | | | use locale; fc("\N{LATIN CAPITAL LETTER SHARP S}") eq 2 x fc("\N{LATIN SMALL LETTER LONG S}") should return true, as the SHARP S folds to two 's's in a row, and the LONG S is an antique variant of 's', and folds to s. Until this commit, the expression was false. Similarly, the following should match, but didn't until this commit: "\N{LATIN SMALL LETTER SHARP S}" =~ /\N{LATIN SMALL LETTER LONG S}{2}/iaa The reason these didn't work properly is that in both cases the actual fold to 's' is disallowed. In the first case because of locale; and in the second because of /aa. And the code wasn't smart enough to realize that these were legal. The fix is to special case these so that the fold of sharp s (both capital and small) is two LONG S's under /aa; as is the fold of the capital sharp s under locale. The latter is user-visible, and the documentation of fc() now points that out. I believe this is such an edge case that no mention of it need be done in perldelta.
* Expand flags parameter from boolean in _to_fold_latin1Karl Williamson2013-05-205-14/+13
| | | | This will be used in future commits to pass more flags.
* unicode_constants.h: Add some #definesKarl Williamson2013-05-202-0/+6
| | | | These will be used in future commits
* utf8.c: Replace two macro calls with equiv singleKarl Williamson2013-05-201-12/+6
| | | | | | | UTF8_IS_ABOVE_LATIN1() is equivalent to (! UTF8_IS_INVARIANT && !UTF8_IS_DOWNGRADEABLE_START) So we can use just it, for clearer code with fewer branches.
* lib/charnames.t: Fix wrongly complemented testKarl Williamson2013-05-201-2/+2
| | | | | | | The 'if' test should be the opposite of what it is. I believe I had it this way for forcing the branch to be taken during testing, and forgot to restore it. It only matters if Perl is compiled with early Unicodes, or on a non-ASCII platform.
* t/re/fold_grind.t: White space onlyKarl Williamson2013-05-201-139/+154
| | | | | Commit 3345a47950127cf99a197eba4dce9c91f7bc9139 created a new block; but didn't indent it. This commit does.
* perlapi: Move 'experimental' warning to front of entriesKarl Williamson2013-05-201-2/+2
| | | | | | In a long multi-paragraph entry, the fact that the described function is considered experimental may be lost, as it comes at the end. This just moves it to the front.
* regcomp.c: Remove always-true testKarl Williamson2013-05-201-2/+1
| | | | | In this code, j is guaranteed to be above 255, so no need to test for that.
* regcomp.c: White-space onlyKarl Williamson2013-05-201-68/+66
| | | | | | The previous commit allows us to outdent a largish block, reflowing things to fit into the extra available width, and saving a few vertical pixels.
* regcomp.c: Reorder two 'if's so shorter branches are firstKarl Williamson2013-05-201-28/+32
| | | | This makes it easier to understand what is going on
* perllocale: Update to mention fc(), \FKarl Williamson2013-05-201-3/+3
|
* regcomp.c: Clarify commentKarl Williamson2013-05-201-11/+11
|
* pp.c: Eliminate custom macro and use Copy() insteadKarl Williamson2013-05-203-15/+17
| | | | | | I think it's clearer to use Copy. When I wrote this custom macro, we didn't have the infrastructure to generate a UTF-8 encoded string at compile time.
* perl #117865] [PATCH] Eliminate useless variable and sizeof(char)Dagfinn Ilmari Mannsåker2013-05-201-4/+2
| | | | | | bufsiz is always just set from bsiz (via a useless multiplication by sizeof(char), which is by definition 1), so instead of trying to keep them in sync, just get rid of bufsiz use bsiz directly# Please enter the commit message for your changes. Lines starting
* op.c: Don't fold constant fc() in localeKarl Williamson2013-05-201-0/+1
| | | | | | | | | | | | | We do compile time folding of calls to ops with constant parameters. This should be skipped if the op's result depends on locale, and it is being called from within the scope of 'use locale', as the result is not known until runtime. fc() was folding anyway. There is no test, as this only shows up when run in a locale that it makes a difference in, and there is no guarantee that such a locale would occur on any computer, and it is a real pain to go searching through the computer's available locales for such a one for just this error.
* autodoc.pl: Don't list undocumented deprecated fcns in APIKarl Williamson2013-05-201-2/+3
| | | | | | | autodoc creates a list of all the undocumented functions that are part of the API. It omits ones that are experimental and whose API may change; and now it omits ones that are deprecated (and whose API is planned to change to be non-existent)
* autodoc.pl: Add note for deprecated functionsKarl Williamson2013-05-203-10/+10
| | | | | This causes each deprecated function to have a prominent note to that effect in its API documentation.
* embed.fnc: Slight clarification in commentsKarl Williamson2013-05-201-1/+1
|
* Add tests for case-change macros APIKarl Williamson2013-05-203-3/+382
|
* Use new case changing macrosKarl Williamson2013-05-204-14/+10
| | | | | The previous commit added macros to do some case changing. This commit uses them in the core, where appropriate.
* handy.h: Add some macro definitionsKarl Williamson2013-05-201-1/+23
| | | | | | | | These macros fill in all the missing case changing operations. They were omitted before because they are identical in their input domains to other operations. But by adding them here, that detail no longer need be known by the callers. toFOLD_LC is not documented, as is subject to change
* pp.c: Nit in commentKarl Williamson2013-05-201-1/+1
|
* perlclib.pod: Update character class macro descriptionsKarl Williamson2013-05-201-22/+44
| | | | Much has changed since this pod was last updated.
* perlclib.pod: Fix too long verbatim linesKarl Williamson2013-05-202-64/+66
|
* perlapi: Add docs for some case-changing macros; clarify othersKarl Williamson2013-05-202-44/+104
| | | | | | | | | | | The case changing macros are now almost all documented. The exception is toUPPER_LC, which may change in 5.19 In addition the functions in utf8.c that these macros call now refer to them instead of having their own documentation. People should really be using the macros instead of calling the functions directly. I'm not deprecating the functions because I can't foresee the need to change them, so code that uses them should continue to be ok.
* Remove perlsh, which is neither installed nor referenced anywhere.Nicholas Clark2013-05-202-16/+0
| | | | | | Described as a "poor man's perl shell", it is unreferenced, and virtually unchanged since its addition in perl 2. As it is never installed, it's not used by anyone.
* Update Test-Harness to CPAN version 3.27Nicholas Clark2013-05-2058-155/+447
| | | | | | | | | | | | | | | | [DELTA] 3.28 2013-05-02 - Bugfix: Fix taint failures on Windows (Jan Dubois) 3.27 2013-04-30 - Dramatically reduce memory usage (Nick Clark, RT #84939) - Store test_num (in Grammar.pm) as a number instead of a string. Reduces memory usage (Nick Clark, RT #84939) - PERL5LIB is always propogated to a test's @INC, even with taint more (Schwern, RT #84377) The local modifications to t/source.t are retained. [rt.cpan.org #64353]
* handy.h: Add missing toFOLD_utf8 macroKarl Williamson2013-05-201-0/+1
| | | | This corresponds to the other case changing macros
* handy.h: define some synonyms for consistencyKarl Williamson2013-05-201-2/+8
| | | | Other macros have these suffixes, so for uniformity add these.
* regcomp.c: White-space onlyKarl Williamson2013-05-201-2/+2
| | | | Change this to follow perl coding conventions
* mg.c: White-space onlyKarl Williamson2013-05-201-2/+5
| | | | I found re-formatting this multi-line 'if' to be easier to understand
* toke.c: Remove redundant testKarl Williamson2013-05-201-1/+1
| | | | | | This checks that something is both not-printable and not a word character, but all word characters are printable, so just the non-printable test suffices.