| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Since the removal of PERL_OBJECT
(acfe0abcedaf592fb4b9cb69ce3468308ae99d91) PERL_IMPLICIT_CONTEXT and
MULTIPLICITY have been synonymous and they're being used interchangeably.
To simplify the code, this commit replaces all instances of
PERL_IMPLICIT_CONTEXT with MULTIPLICITY.
PERL_IMPLICIT_CONTEXT will stay defined for compatibility with XS
modules.
|
|
|
|
|
|
|
|
|
|
| |
The strftime() format %p yields an am/pm indicator. Many locales don't
have this distinction, and so a format containing just this specifier
will return an empty string. Prior to this commit, that was considered
an error. What was going on is we kept enlarging the buffer to find a
non-empty return, to no avail, and so treat it as an error. This commit
special cases this to not make it an error. (It's hard to imagine that
the am/pm string alone would exceed the 200 byte limit.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes GH #18341
There are problems with getenv() on threaded perls wchich can lead to
incorrect results when compiled with PERL_MEM_LOG.
Commit 0b83dfe6dd9b0bda197566adec923f16b9a693cd fixed this for some
platforms, but as Tony Cook, pointed out there may be
standards-compliant platforms that that didn't fix.
The detailed comments outline the issues and (complicated) full solution.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes GH #18341
The Perl wrapper for getenv() was changed in 5.32 to allocate memory to
squirrel safely away the result of the wrapped getenv() call. It does
this while in a critical section so as to make sure another thread can't
interrupt it and destroy it.
Unfortunately, when Perl is compiled for debugging memory problems and
has PERL_MEM_LOG enabled, that allocation causes a recursive call to
getenv() for the purpose of checking an environment variable to see how
to log that allocation. And hence it deadlocks trying to enter the
critical section.
There are various solutions. One is to use or emulate a general semaphore
instead of a binary one. This is effectively what
PL_lc_numeric_mutex_depth does for another mutex, and the code for that
could be used as a template.
But given that this is an extreme edge case which requires Perl to be
specially compiled to enable this feature which is used only for
debugging, a much simpler, if less safe if it were to ever be used in
production, solution should suffice. Tony Cook suggested just avoiding
the wrapper for this particular purpose.
|
|
|
|
| |
into Debugging and Display sections
|
|
|
|
|
|
|
|
|
|
|
| |
This feature allows documentation destined for perlapi or perlintern to
be split into sections of related functions, no matter where the
documentation source is. Prior to this commit the line had to contain
the exact text of the title of the section. Now it can be a $variable
name that autodoc.pl expands to the title. It still has to be an exact
match for the variable in autodoc, but now, the expanded text can be
changed in autodoc alone, without other files needing to be updated at
the same time.
|
|
|
|
|
|
| |
I modified this function in ab01742544b98b5b5e13d8e1a6e9df474b9e3005,
and did not fully understand the edge cases. This commit now handles
those properly, the same as plain delimcpy() does.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this commit delimcpy() parsed its input byte-by-byte, looking
for a particular character, and copied the input to the output stopping
just before the first such occurrence.
memchr() is much faster for finding a single character.
The complication is that if the character is preceded by a backslash,
it doesn't count as that character, it is considered to be escaped, and
parsing continues to the first unescaped occurrence, if any. Each
escaping backslash is not copied.
The prior code also failed to account for the possibility of the delimiter
being a backslash, the same as the escape.
The new routine looks for the character with memchr, sees if it is
escaped. If not, Copy does the whole copy at once. If it is escaped,
it uses Copy up to that backslash, and repeats the process.
|
|
|
|
|
|
|
|
|
| |
For: https://github.com/Perl/perl5/pull/18201
Committer: Samanta Navarro is now a Perl author.
To keep 'make test_porting' happy: Increment $VERSION in several files.
Regenerate uconfig.h via './perl -Ilib regen/uconfig_h.pl'.
|
|
|
|
| |
When you are about to die, the time/space tradeoff may tilt towards space.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This uses a new organization of sections that I came up with. I asked
for comments on p5p, but there were none.
|
|
|
|
| |
These weren't indented so weren't treated as verbatim
|
| |
|
|
|
|
| |
These just refer to foo's pod, with an explanation of 'nocontext'
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function finds a needle in a haystack.
If memrchr() is available, use it to find the final byte in the needle;
If the needle is length 1, that's all we need, and this is special
cased. Otherwise it uses memEQ of the other bytes of the needle, from
where the needle would have to start, and if no match, repeats.
If no memrchr(), it emulates that by just looking backward from the end
until it finds the needle's final byte; then proceeds as above.
|
| |
|
|
|
|
|
| |
This function is perl's memmem if that function isn't available. This
commit replaces its loop with a call to memchr, which is a C89 function.
|
|
|
|
|
|
|
|
| |
This was doing a byte-by-byte search and copy. We can make things
simpler and faster by
1) only looking within the available space region
2) using memchr for seach
3) using Copy to copy the whole thing at once.
|
|
|
|
| |
This will make some future commits a little less noisy
|
|
|
|
|
|
|
|
|
| |
These functions were only part of the API if perl is built with clang.
However perl modules built with clang still try to use them even
when perl itself is built with gcc. This patch replaces the #ifdef PERL_TSA_ACTIVE
around these functions with defined(USE_ITHREADS) && defined(I_PTHREAD)
so they are always available when treading is enabled. This fixes the clang build of
perl modules when perl is built with gcc.
|
|
|
|
|
| |
It only does anything under PERL_GLOBAL_STRUCT, which is gone.
Keep the dNOOP defintion for CPAN back-compat
|
|
|
|
|
|
|
|
| |
This was originally added for MinGW, which no longer needs it, and
only still used by Symbian, which is now removed.
This also leaves perlapi.[ch] empty, but we keep the header for CPAN
backwards compatibility.
|
|
|
|
|
| |
Also eliminate USE_HEAP_INSTEAD_OF_STACK and
SETSOCKOPT_OPTION_VALUE_T, since Symbian was the only user of those.
|
|
|
|
|
| |
This hasn't actually been used since commit
8922e4382e9c1488fdbe46a0f52493860dc897a6.
|
|
|
|
|
|
| |
Instead, do a translation of the ASCII one at runtime. This is because
the table doesn't account for the various EBCDIC flavors, so isn't
actually accurate.
|
|
|
|
|
|
|
| |
Commit b001a0d149ed99df18916796f3a72b2c888b94d8 changed it to bumping
the size from 0 to 1 earlier in the function, but didn't remove the
then-redundant ternary that tried to avoid passing zero to
PerlMem_malloc().
|
|
|
|
|
| |
Mostly in comments and docs, but some in diagnostic messages and one
case of 'or die die'.
|
|
|
|
|
| |
Sprinkle some dVAR pixie dust to fix recent bitrot on that build
configuration.
|
|
|
|
|
|
| |
This locks around localtime (and localtime_r which this call may be
translated into) which are sensitive to locale and environment changes
in their execution.
|
|
|
|
| |
introduced by cd7ac46508e1b2b346c339417237ef487bf59c74
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 6c714a09cc08600278e72aea1fcdf83576d061b4.
croak_memory_wrap is designed to save a few bytes of memory, and was
never intended to be inlined. This commit moves it to util.c where the
other croak functions are.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit added a mutex specifically for protecting against
simultaneous accesses of the environment. This commit changes the
normal getenv, putenv, and clearenv functions to use it, to avoid races.
This makes the code simpler in places where we've gotten burned and
added stuff to avoid races. Other places where we haven't known we were
getting burned could have existed until now. Now that comes
automatically, and we can remove the special cases we earlier stumbled
over.
getenv() returns a pointer to static memory, which can be overwritten at
any moment from another thread, or even another getenv from the same
thread. This commit changes the accesses to be under control of a
mutex, and in the case of getenv, a mortalized copy is created so that
there is no possible race.
|
|
|
|
|
| |
This is in preparation for it being used elsewhere, to reduce
duplication of code.
|
|
|
|
|
|
|
| |
This commit changes this function to use memchr() instead of looping
byte-by-byte through the string. And it inlines it into 3 lines of
code. This should give comparable performance to a native libc
strnlen().
|
|
|
|
|
| |
Commit 052d914306c3a13afe3fbeb17c8f1c986969f94c changed the type of this
parameter to unsigned, so it is now never negative.
|
|
|
|
| |
We handle longer strings than 31 bits.
|
| |
|
|
|
|
|
|
|
| |
This replaces strchr("list", c) calls throughout the core. They don't
work properly when 'c' is a NUL, returning the position of the
terminating NUL in "list" instead of failure. This could lead to
segfaults or even security issues.
|