| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The comment from Tony Cook
https://github.com/Perl/perl5/issues/20373#issuecomment-1524256091
made me realize that this function doesn't fully work. It was added as
public API earlier in the 5.37 series, but we don't want it making it
into a stable release. This commit renames it so that the original name
will no longer work, but POSIX.xs can still, by changing to use the new
name.name
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also spell check and remove empty sections.
|
|
|
|
| |
Also trim some whitespace from perlvar.pod
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_close() on an fd calls CloseHandle(), which is illegal if the fd
contains a socket handle.
We previously worked around this by having our own close(), which called
closesocket() before calling _close()
(e601c439adce167078ac7b49550c0418ace86f94).
Amusingly, the author of that solution thought it's just a temporary
workaround:
/*
* close RTL fd while respecting sockets
* added as temporary measure until PerlIO has real
* Win32 native layer
* -- BKS, 11-11-2000
*/
To make it thread-safe, we had to manipulate the internals of file
descriptors, which kept changing
(b47a847f6284f6f98ad7509cf77a4aeb802d8fce).
Unfortunately, the C runtime has been rewritten and it no longer exposes
them at all. We had to disable the thread-safety fix in Visual C++ 2015
builds (1f664ef5314fb6e438137c44c95cf5ecdbdb5e9b). It also wouldn't work
with MinGW configured to use UCRT.
This commit introduces a new solution: we inject a socket-aware version
of CloseHandle() into the C runtime library. Hopefully, this will be
less fragile.
This also fixes a few issues that the original solution didn't:
- Closing a busy pipe doesn't cause a deadlock (fixes #19963)
- _dup2 properly closes an overwritten socket (fixes #20920)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This exposes the "last successful pattern" as a variable that can be
printed, or used in patterns, or tested for definedness, etc. Many regex
magical variables relate to PL_curpm, which contains the last successful
match. We never exposed the *pattern* directly, although it was
implicitly available via the "empty pattern". With this patch it is
exposed explicitly. This means that if someone embeds a pattern as a
match operator it can then be accessed after the fact much like a qr//
variable would be.
@ether asked if we had this, and I had to say "no", which was a shame as
obviously the code involved isn't very complicated (the docs from this
patch are far larger than the code involved!). At the very least
this can be useful for debugging and probably testing. It can also
be useful to test if the /is/ a "last successful pattern", by checking
if the var is defined.
|
| |
|
|
|
|
|
|
|
|
|
| |
Using class attributes in the unit class syntax was a syntax error. This change makes the following two lines equivalent:
class B :isa(A) ;
class B :isa(A) { }
Addresses GH issue #20888.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- add additions to perldiag
- documentation section
- remove placeholders
- finalize Acknowledgements
- fix typos
- linkify issue/PR references
|
| |
|
|
|
|
| |
a683fa5b7e816ae5c10d246c9a0b1f3ea743274b
|
|
|
|
| |
71d63d0dc1fcf23d28f488655c105c0dfefbd254
|
|
|
|
| |
It used to be U16_MAX and it is now I32_MAX.
|
|
|
|
|
|
|
|
| |
We have fixed bugs related to $SIG{__DIE__} being inconsistently
triggered during eval, and we have fixed bugs with compilation
inconsistently stopping after 10 errors. This patch also includes a
micro-tweak to perl.h to allow the threshold to be sanely overriden in
Configure.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dave M pointed out that this idea was flawed, and after some testing I have
come to agree with him. This removes it. It was only available for 5.37.8,
so no deprecation cycle involved.
The point of (**{ ... }) was to have a postponed eval that does not disable
optimizations. But some of the optimizations are disabled because if they
are not we do not match correctly as the optimizations will make unwarranted
assumptions about the pattern, assumptions which can be incorrect depending
on what pattern is returned from the codeblock. The original idea was
proposed because (?{ ... }) was treated as though it was (??{ ... }) and
disabled many optimizations, when in fact it doesn't interact with
optimizations at all. When I added (*{ ... }) as the optimistic version of
(?{ ... }) I used "completeness" as the justification for also adding
(**{ ... }) when it does not make sense to do so.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds (*{ ... }) and (**{ ... }) as equivalents to (?{ ... }) and
(??{ ... }). The only difference being that the star variants are
"optimisitic" and are defined to never disable optimisations. This is
especially relevant now that use of (?{ ... }) prevents important
optimisations anywhere in the pattern, instead of the older and inconsistent
rules where it only affected the parts that contained the EVAL.
It is also very useful for injecting debugging style expressions to the
pattern to understand what the regex engine is actually doing. The older
style (?{ ... }) variants would change the regex engines behavior, meaning
this was not as effective a tool as it could have been.
Similarly it is now possible to test that a given regex optimisation
works correctly using (*{ ... }), which was not possible with (?{ ... }).
|
|
|
|
| |
Commits for Math-Complex upgrade to 1.60
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
They are similar to SVf and SVf_QUOTEDPREFIX but take an HV * argument
and use HvNAME() and related macros to extract the string. This is
helpful as it makes constructing error messages from a stash (HV *)
easier. It is the callers responsibility to ensure that the HV is
actually a stash.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The blamed commit, 04de022, exposed a bug in the module itself. I will
submit a PR to fix it.
But this ticket did tell me that there was a problem with that commit.
It returned a C language value, CHAR_MAX, which doesn't really have a
corresponding concept in Perl. Instead we use -1 to indicate that a
positive-valued variable is in some abnormal state. This commit changes
to do that, and documents the changes, which should have been done in
04de022.
|
| |
|
|
|
|
|
|
|
| |
Using the new `forbid_outofblock_ops()`, many kinds of forbidden control
flow out of a `defer` or `finally` block can be detected statically with
this function by analysing the optree, rather than leaving it until
runtime when the attempt is actually made.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an object doesn't have an INC hook then don't call it. Either simply
stringify the ref (think overloads), OR, if it is a blessed coderef,
then just execute it like it was an unblessed coderef.
Also handle when an object is passed as the first argument of the
array form of call. Previously this would throw an exception as the
first argument on the stack when we call_method() would not be
blessed. When this is the scenario we pass in the array as the third
argument to the method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to keep track of what we actually checked. We cannot simply
report the state of @INC at the end of the require, as it might have
changed, possibly several times during the require. This also accounts
for most "silly" stuff that might upset our internal assumptions, for
instance where a tie might report one value to the code doing the
directory check and another in the error message.
We had long standing tests to see that @INC tie elements where called
"once" but they actually tested they were called twice despite claiming
otherwise. This fixes all of those test so that a tied @INC entry is
called exactly once, and whatever it returned the first time is placed
in the error message.
This includes a change to the require error message, so that where it
once said "@INC contains:" it now says "@INC entries checked:". Note
this patch requires parent v0.239 to be available (which was done
in the previous commit).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When dealing with a tied scalar with get magic, and the FETCH method
returned a blessed reference with overloading magic (with "a" magic),
the tied scalar returned from the fetch was not copied prior to calling
the magic function as an argument, this would then cause the get magic
to be called again if the overloaded method happened to copy or
otherwise use the tied scalar. The solution is to copy the reference
prior to dispatching the overload call.
It looks like we have been testing for the double FETCH for some time,
without any good rationale, so this test merely changes things to expect
the desired count.
|