| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I intended to convery in the names of these macros that they exist to
present a uniform api to the layers above, minimally processing the
layer below to achieve that. So for example, is_porcelain_BLANK hides
the fact that isblank() doesn't exist on all platforms, or
is_porcelain_DIGIT matches the same set of 0..9 on all platforms, fixing
the non-standard definition Windows has.
I thought this is what git had meant when it used 'porcelain', but Tony
Cook informed me that it actually means something else. So to avoid
confusing people who might be aware of the real git meaning, this commit
changes 'porcelain' to 'base', which, while not entirely satisfactory,
is the best short name I have been able to think of.
|
|
|
|
| |
This is so you can print them without having to know their length.
|
|
|
|
| |
Two files were included in that commit that shouldn't have been
|
|
|
|
|
|
|
| |
This is a relic from long ago. mktables creates lib/unicore/Name.pm.
And in that file which is for internal core use only, it was creating
the beginnings of some pod, but quite incomplete; this was confusing
buildtoc, which perhaps could be hardened against such inputs.
|
|
|
|
| |
Tony Cook and Leon Timmermans explained this to me.
|
|
|
|
|
| |
This was meant to be a part of the previous commit, but somehow got
omitted.
|
|
|
|
|
| |
The sorting order of perlapi is supposed to be dictionary order. These
synonyms were grouped with other names in a non-ordered way.
|
|
|
|
| |
These shouldn't be indented
|
|
|
|
|
|
|
|
| |
This appears to have been broken for a while, and became more broken
with 75acd14e, which made newSV_type() inline.
This will also prevent warnings about calls to undeclared functions
on systems that don't need symbols to be exported.
|
|
|
|
|
| |
This layer currently expands to just the layer below it, but that will
be changed in a future commit.
|
|
|
|
| |
As a convenience to other code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new set of macros, forming a lower layer to what is currently
there, to wrap the character classification libc functions, isdigit()
etc, and case changing ones, tolower(), toupper().
On most platforms these expand simply to the libc function call. But on
Windows, they expand to something more complex, to bring the Windows
calls into POSIX compliance. Similarly, but not as extensive, IBM
products have some non-compliant behavior, and one macro is made more
comples to fix that. Previously compliance was achieved at a higher
level, with the result that lower level calls were broken. This
resulted in parts of the test suite being skipped on Windows and IBM,
which remain for now.
The current level is rewritten to use the new lower layer, with the
result that it is simpler, as the complexity is now done further down.
|
|
|
|
| |
These 3 sets of macros can be collapsed trivially into 3 macros.
|
|
|
|
|
|
|
| |
This is to make the difference listing in future commits smaller.
This change includes some comment changes, and some extra parens around
some subexpressions
|
|
|
|
|
|
| |
By redefining a wrapper macro used in one set based on compile-time
info; the other set can be defined in terms of it, and the separate
entries removed.
|
|
|
|
|
|
|
|
|
| |
This commit changes what happens on platforms without locale handling to
use our precomputed definitions of what the various character class
definitions and case changing operations are. Previously, it just
called the libc locale-dependent functions and made sure the result was
ASCII. I think this is a holdover from before we had the precomputed
definitions
|
|
|
|
|
|
| |
These two macros are equivalent as folding and lowercasing are the same
for this input domain. Better to say so rather than to replicate the
definitions.
|
|
|
|
|
| |
The cast is required to be U8 by the POSIX standard. There is no need
to have this added generality.
|
|
|
|
| |
This changes the parameters etc, in preparation for further changes
|
|
|
|
|
|
| |
LC_CAST_ was my attempt at generality, but I didn't realize that the
POSIX standard specifies the type that this was meant to generalize, so
there isn't any need for it.
|
|
|
|
|
|
|
| |
C reserves symbols beginning with underscores for its own use. This
commit moves the underscore so it is trailing, which is legal. The
symbols changed here are many of the ones in handy.h that have
significant uses outside it.
|
|
|
|
|
|
| |
It is possible to compile perl to not pay attention to LC_CTYPE. This
was testing for no locales at all; whereas the stricter requirement
should be used.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This changes these compilation conditionals so that things in common
between Windows and other platforms are only defined once.
It changes the isIDFIRST_LC and isWORDCHAR_LC definitions for
non-Windows to match that platform superficially, though expanding to
what it previously did to.
|
|
|
|
|
| |
Replace isIDFIRST_LC and isWORD_CHAR_LC isIDFIRST_LC with slightly
faster implementations.
|
|
|
|
|
|
|
| |
C reserves symbols beginning with underscores for its own use. This
commit moves the underscore so it is trailing, which is legal. The
symbols changed here are most of the ones in handy.h that have few uses
outside it.
|
|
|
|
| |
No need to re-derive it
|
|
|
|
|
| |
This may cause problems when not used correctly; so continue to restrict
it.
|
|
|
|
| |
Add comment to that
|
|
|
|
|
| |
The text has been expanded to discuss what happens if the any of the
pointer parameters are NULL.
|
|
|
|
| |
Indent preprocessor directives to clarify that they are in #ifdef
|
| |
|
|
|
|
| |
They're widely used on CPAN, especially safemalloc.
|
|
|
|
|
|
| |
Making these a single entry makes perlapi more concise with less
repetition, and clarifies the similarities and distinctions between the
variant forms.
|
|
|
|
|
| |
This commit consolidates the D form of each function in perlapi with the
plain form.
|
| |
|
|
|
|
| |
To make sure at compile time that its argument is a ptr
|
|
|
|
|
| |
This is intended to make it obvious what this relatively obscure C
construct is doing.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This existed because there wasn't a compiler bool necessarily, and
made complicated to workaround a bug in an AIX compiler as of 2010-ish.
Now that C99 is required, there always is a bool type; we don't know if
the bug existed in a C99 mode for the broken compiler, and sufficient
time has passed that it should have been fixed nonetheless.
This was tested on
IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72)
Version: 12.01.0000.0012
which dates to about 2012.
|
|
|
|
|
|
| |
This is no longer used in core. It occurs twice in metacpan, both to
define it so as to fool core into thinking it is there; hence it isn't
actually used at all in cpan.
|
|
|
|
|
|
|
|
|
|
| |
Now that C99 is required, bool is always defined, so HAS_BOOL should
also always be defined.
PERL_BOOL_AS_CHAR was used to workaround problems when no bool type
existed, so it is obsolete, and in fact perl won't compile if
PERL_BOOL_AS_CHAR is #defined. So remove it completely from being
looked at.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This had been changed by 9555181b32f9b30122a8ea4e779c2c9916cec9f8 to
evaluating multiple times.
(sizeof() also is called with the parameter, but that doesn't actually
evaluate the parameter.)
The previous version of this commit used a comparison with 0xFF, but gcc
is smart enough to realise that `comparison is always true due to limited
range of data type`, but not smart enough to realise that the sizeof makes
that code unreachable. Hence with -Wtype-limits we get thousands of warnings.
Using >> defeats the warnings.
|
|
|
|
| |
See https://github.com/Perl/perl5/issues/18655, which this fixes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These macros use
(x) | 0
to get a compiler error if x is a pointer rather than a value. This was
instituted because there was confusion in them as to what they were
called with.
But the purpose of the paradigm wasn't obvious to even some experts; it
was documented in every file in which it was used, but not at every
occurrence. And, not every compiler can cope with them, it turns out.
Making the paradigm into a macro, which this commit does, makes the uses
self-documenting, albeit at the expense of cluttering up the macro
definition somewhat; and allows the mechanism to be turned off if
necessary for some compilers. Since it will be enabled for the majority
of compilers, the potential bugs will be caught anyway.
|
|
|
|
|
|
|
|
|
|
| |
I found this reading code. The macro is supposed to check for something
not being in the ASCII range, but instead checked that the input is
invariant under UTF-8. These concepts evaluate to the same thing on
ASCII platforms, but differently on EBCDIC ones. The calls to this
macro are such that there isn't a bug that surfaces here, but the code
generated is slightly different, and it should be fixed to prevent any
future issues.
|
|
|
|
| |
The previous commit stopped using this code, so can just get rid of it.
|
|
|
|
|
| |
By using a cast to U8, the '&' operation can be elminated, and the macro
easier to read.
|
|
|
|
|
|
| |
This finishes the work started by
3cb048e540f681a46e641b466030b55feaf5d337 for toLOWERfoo, using the same
paradigm, for the rest of the case changing macros and functions.
|