| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This allows the removal of a conditional in a very low level (called a
lot) macro
|
|
|
|
| |
Reorder the clauses to check first before dereferencing
|
|
|
|
|
| |
This uses inRANGE() with mnemonics to make it clearer with no increase
in the number of conditionals
|
|
|
|
| |
This leads to a single conditional instead of two.
|
|
|
|
|
|
|
|
|
|
| |
This adds branch prediction and re-orders so that an unlikely to succeed
test is done before the likely to succeed one, so that the latter
usually doesn't need to be executed. Since both conditions must succeed
for the entire expression to succeed, this doesn't change what the whole
expresson matches.
s# Please enter the commit message for your changes. Lines starting
|
|
|
|
|
|
|
|
|
|
|
| |
This just detabifies to get rid of the mixed tab/space indentation.
Applying consistent indentation and dealing with other tabs are another issue.
Done with `expand -i`.
* vutil.* left alone, it's part of version.
* Left regen managed files alone for now.
|
| |
|
|
|
|
|
|
|
|
| |
Many of the files in perl are for one thing only, and hence their
embedded documentation will be for that one thing. By creating a hash
here of them, those files don't have to worry about what section that
documentation goes under, and so it can be completely changed without
affecting them.
|
|
|
|
| |
C<L</foo>> renders better in places than L</C<foo>>
|
| |
|
| |
|
|
|
|
|
|
| |
It turns out that this macro would have failed to compile since
commit 538b546eb0f252250a30c08e6af47d0ea7433fa1, in October 2013. So it
is clear no one is using it.
|
|
|
|
|
|
|
|
| |
nBIT_MAX was used instead of nBIT_UMAX
from d223e1ea9ae864c0e563187f1e76 changes
note: at first glance it seems that
nBIT_UMAX is an alias for nBIT_MASK
|
|
|
|
|
| |
It is likely that the data will be well-formed Unicode, and not one of
its special characters, like surrogates or non-characters, nor NUL.
|
|
|
|
|
| |
This encapsulates a common paradigm, making sure that it is done
correctly for the platform's size.
|
|
|
|
|
| |
Mostly in comments and docs, but some in diagnostic messages and one
case of 'or die die'.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
These macros were missed in dd1a3ba7882ca70c1e85b0fd6c03d07856672075
and 059703b088f44d5665f67fba0b9d80cad89085fd.
Using them would cause things to fail to compile
|
|
|
|
| |
These are needed only to allow some modules to stay updated with blead.
|
|
|
|
| |
It makes things a little clearer.
|
| |
|
|
|
|
|
| |
Higher has been reserved for core use, and a future commit will want to
finally do this.
|
|
|
|
|
|
|
| |
At the moment the _ASSERT_() is the one which has been showing large
expansions. Change so it doesn't do anything if PERL_SMALL_MACRO_BUFFER
is defined. That means various other calls that use
PERL_SMALL_MACRO_BUFFER can be simplified to not use it.
|
| |
|
|
|
|
| |
I forgot an arg in a macro it calls.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a safer version of UTF8SKIP for use when the input could be
possibly malformed. It uses strnlen() to not read past a NUL in the
input. Since Perl adds NULs to the end of SV's, this will likely
prevent reading beyond the end of a buffer.
A still safer version could be written that doesn't look for just a NUL,
but any unexpected byte, and stops just before that. I suspect that is
overkill, and since strnlen() can be very fast, I went with this
approach instead. Nothing precludes adding another version that does
this full checking
|
| |
|
|
|
|
| |
This can be derived from other values, removing an EBCDIC dependency
|
|
|
|
| |
This can be derived from other values, removing an EBCDIC dependency
|
|
|
|
| |
This can be derived from other values, removing an EBCDIC dependency
|
|
|
|
| |
This can be derived from other values, removing an EBCDIC dependency
|
|
|
|
| |
This can be derived from other values, removing an EBCDIC dependency
|
|
|
|
| |
This can be derived from other values, removing an EBCDIC dependency
|
|
|
|
| |
This can be derived from other values, removing an EBCDIC dependency
|
|
|
|
| |
This can be derived from other values, removing an EBCDIC dependency
|
|
|
|
|
| |
This variable can be defined from the same base in both UTF-8 and
UTF-EBCDIC, and doing so eliminates an EBCDIC dependency.
|
| |
|
|
|
|
| |
The called macro does the cast already
|
|
|
|
|
| |
By doing an '| 0' with a parameter in a macro expansion, a C syntax
error will be generated. This is free protection.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It has been deprecated since 5.26 to use various macros that deal with
UTF-8 inputs but don't have a parameter indicating the maximum length
beyond which we should not look. This commit changes all such macros,
as threatened in existing documentation and warning messages, to have an
extra parameter giving the length.
This was originally scheduled to happen in 5.30, but was delayed because
it broke some CPAN modules, and there wasn't really a good way around
it. But now that Devel::PPPort 3.54 is out, ppport.h has new facilities
for getting modules making these changes to work with older Perl
releases.
|
|
|
|
|
| |
A function name with a leading underscore is not legal in C. Instead
add a suffix to differentiate this name from an otherwise identical one.
|
|
|
|
| |
Leading underscored name are reserved for the C implementers
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
For well formed input, there is no change. But for malformed it wasn't
returning the documented length when warnings were enabled, and not
always the documented value when they were disabled.
This is implemented as an inline function, called from both the macro
and the Perl_ form.
Devel::PPPort has sufficient tests for this.
|
|
|
|
|
|
|
| |
This was due to UTF8_SAFE_SKIP(s, e) not allowing s to be as large as e,
and there are legitimate cases where it can be. This commit hardens the
macro so that it never reads above e-1, returning 0 if it otherwise
would be required to. The assertion is changed to 's <= e'.
|
|
|
|
| |
This version of UTF8SKIP refuses to advance beyond the end pointer
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the most obvious and easy things that are no longer needed
since regexes no longer use swashes at all.
tr/// continues, for the time being, to use swashes, so not all swash
handling is removable now. But tr/// doesn't use inversion lists, and
so a bunch of code is ripped out here. Other code could have been, but
I did only the relatively easy stuff. The rest can be ripped out all at
once when tr/// is stops using swashes.
|