| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
These days, static inline functions are the better bet, as you don't
have to maintain two code paths.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A long standing bug in Perl that has gone undetected is that the array
is global that is created when changing locales and tells fc() and qr//i
matching what the folds are in the new locale.
What this means is that any program only has one set of fold definitions
that apply to all threads within it, even if we claim that the locales
are thread-safe on the given platform. One possibility for this going
undetected so long is that no one is using locales on multi-threaded
systems much. Another possibility is that modern UTF-8 locales have the
same set of folds as any other one.
It is a simple matter to make the fold array per-thread instead of
per-process, and that solves the problem transparently to other code.
I discovered this stress-testing locale handling under threads. That
test will be added in a future commit.
In order to keep from having a dTHX inside foldEQ_locale, it has to have
a pTHX_ parameter. This means that the other functions that function
pointer variables get assigned to point to have to have an identical
signature, which means adding pTHX_ to functions that don't require it.
The bodies of all these are known to the compiler, since they are all
in inline.h or in the same .c file as where they are called. Hence the
compiler can optimize out the unused parameter.
Two calls of STR_WITH_LEN also have to be changed because of C
preprocessor limitations; perhaps there is another way to do it that I'm
unfamiliar with.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 00a5df846e035280750985222a693ac58022ee36 fixed some c undefined
behavior, but it will not compile with g++, because a goto crosses
initialization.
https://stackoverflow.com/questions/14274225/statement-goto-can-not-cross-variable-definition
and its links sort of explains why
This commit works around this limitation
|
| |
|
|
|
|
|
| |
7008caa915ad99e650acf2aea40612b5e48b7ba2 removed several deprecated
functions, but did not remove all the pods thereof.
|
|
|
|
| |
Spotted by clang 14.
|
|
|
|
| |
Spotted by clang-14.
|
| |
|
|
|
|
|
|
| |
Ultrix has been removed. Ultrix was the native Unix-like operating
system for various Digital Equipment Corporation machines. Its final
release was in 1995.
|
| |
|
|
|
|
|
|
|
| |
This required making it into an inline function. I tried using
STMT_START{ ... } STMT_END, which should work since it has a void
return, but there were places where it was used in a comma operator, and
those did not compile.
|
|
|
|
|
| |
Capitalize Perl when referring to the language (rather than the interpreter).
Also pluralize "built-ins" and format "CORE" package.
|
|
|
|
| |
Properly indent some nested preprocessor directives
|
|
|
|
|
| |
This #defines a macro and uses it to populate a structure, so that
strings don't have to be typed twice.
|
|
|
|
|
|
| |
Perl defaults to the bitmap for ANYOF nodes being for the lowest 256
characters, but it is possible to compile the bitmap to be up to size
2**16. Doing so, prior to this commit, broke Turkish locale handling.
|
|
|
|
|
|
|
| |
The regnodes in the ANYOFH series by definition don't have a bitmap used
in the other ANYOF-type nodes. Instead they have an inversion list. We
can avoid the overhead of calling the general function that looks first
in the bitmap.
|
|
|
|
|
|
| |
THe previous commit enhanced the DEBUG macros so that they contain the
logic that previously had to be done with conditional compilation
statements. Removing them makes the code easier to read.
|
|
|
|
|
|
|
|
|
|
| |
Because locale initialization happens before command line processing,
one can't pass a -DL argument to enable debugging of locale
initialization. Instead, an environment variable is read then, and is
used to enable debugging or not. In the past, code specifically had to
test for this being set. This commit changes that so that debugging can
automatically be enabled without having to write special code. Future
commits will strip out those special checks.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The XSLoader tests need to play with the XS bits of various modules,
which can interfere with testing modules like Test::More. For example,
Test::More now loads Time::HiRes. This results in redefinition warnings,
and could lead to more serious problems.
Avoid this by creating some test helpers inside the XSLoader test, and
using those rather than Test::More.
The helpers implemented include roughly the same features used by the
test itself, so that the impact on the rest of the test code is minimal.
|
|
|
|
|
| |
As mentioned in https://lists.llvm.org/pipermail/llvm-dev/2015-July/088122.html
and https://github.com/llvm/llvm-project/issues/24625 building with clang-cl currently fails due to the declaration of __PL_nan_u.
By declaring it like this, cl and clang-cl are happy to parse it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
minitest depends on $(MINIPERL_EXE) and minitest_prep, but
minitest_prep calls back into make to build lib/Config.pm which
indirectly depends on $(MINIPERL_EXE).
This can result in a race between the parallel work of the parent
make and the work of the child make, as they both try to build
$(MINIPERL_EXE) and its dependencies, causing some of the errors
described in the ticket.
Note that trying to `make -j6 minitest all` could lead to
similar conflicts, but I think that's an unlikely and not worth
supporting anyway.
Fixes #19829 (I think)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
On Win32 long is only 32-bits (even for x86_64), which meant
file sizes were limited to 2GB.
This successfully runs the example code, and can successfully read
all the keys back.
I didn't add a test, since creating a 2GB (or 8GB for the issue test)
would be unfriendly.
|
|
|
|
| |
No need to re-derive it
|
| |
|
| |
|
| |
|
| |
|