| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Filter::Simple’s $pod_or_DATA regexp was mistakenly written to look
for =end if the pod section began with =begin, and to look for the
end of the paragraph if the pod began with =for. Only =cut and EOF
can end pod.
This patch does not fix Filter::Simple’s naïve way of finding the
beginning of pod.
|
|
|
|
|
|
| |
$[ remains as a variable. It no longer has compile-time magic.
At runtime, it always reads as zero, accepts a write of zero, but dies
on writing any other value.
|
| |
|
| |
|
|
|
|
|
| |
In the previous commit, I added duplicate code to make it obvious what
was going on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Jerry wrote:
> threads::shared objects stored inside other
> threads::shared structures are not properly destroyed.
> When a threads::shared object is 'removed' from a
> threads::shared structure (e.g., a hash), the object's
> DESTROY method is not called.
Later, he said:
> When PL_destroyhook and Perl_shared_object_destroy were
> added, the problem they were overcoming was that the
> destruction of each threads::shared proxy was causing the
> underlying shared object's DESTROY method to be called. The
> fix provided a refcount check on the shared object so that
> the DESTROY method was only called with the shared object
> was no longer in use.
>
> The above works fine when delete() and pop() are used,
> because a proxy is created for the stored shared object that
> is being deleted (i.e., the value returned by the delete()
> call), and when the proxy is destroyed, the object's DESTROY
> method is called.
>
> However, when the stored shared object is 'removed' in some
> other manner (e.g., setting the storage location to
> 'undef'), there is no proxy involved, and hence DESTROY does
> not get called for the object.
This commit fixes that by modifying sharedsv_scalar_store,
sharedsv_scalar_mg_free and sharedsv_array_mg_CLEAR.
Each of those functions now checks whether the current item being
freed has sub-items with reference counts of 1. If so, that means the
sub-item will be freed as a result of the outer SV’s being freed. It
also means that there are no proxy objects and that destructors will
hence not be called. So it pushes a new proxy on to the calling con-
text’s mortals stack. If there are multiple levels of nested objects,
then, when the proxy on the mortals stack is freed, it triggers
sharedsv_scalar_mg_free, which goes through the process again.
This does not fix the problem for shared objects that still exist
(without proxies) at global destruction time. I cannot make that
work, as circularities will cause new proxies to be created continu-
ously and pushed on to the mortals stack. Also, the proxies may end
up being created too late during global destruction, after the mor-
tals stack has been emptied, and when there is not enough of the run-
time environment left for destructors to run. That will happen if
the shared object is referenced by a shared SV that is not an object.
The calling context doesn’t know about the object, so it won’t fire
the destructor at the object-destroying stage of global destruction.
Detecting circularities is also problematic: We would have to keep
a hash of ‘seen’ objects in the shared space, but then how would we
know when to free that? Letting it leak would affect embedded
environments.
So this whole trick of creating mortal proxy objects is skipped during
global destruction.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every function that calls S_get_RV needs this same incantation:
S_get_RV(aTHX_ sv, ssv);
/* Look ahead for refs of refs */
if (SvROK(SvRV(ssv))) {
SvROK_on(SvRV(sv));
S_get_RV(aTHX_ SvRV(sv), SvRV(ssv));
}
Also, S_get_RV keeps repeating SvRV(ssv), even though it assigns it to
sobj at the top.
Also, an upcoming commit will need the ability to pass the referent to
S_get_RV.
So this patch changes S_get_RV to accept a referent instead (eliminat-
ing its multiple use of SvRV) and adds a get_RV macro to take care of
the standard calling rite.
|
|
|
|
|
|
| |
Win32 doesn't have a real execv(), so the " end up in the
command-line, interfering with the normal quoted command-line
processing.
|
|
|
|
|
| |
The two produce identical results. The former is terser, and far more
efficient.
|
|
|
|
|
|
|
|
| |
INCLUDE: $cmd | is the old, deprecated way of reading the output of
a command into a stream of XS code. Unfortunately, it was accidentally
broken by fe7ae66bc2e4a8bbc90ba0d852e511116d6e97bb by replacing the
two-arg open with a three-arg open that opens in read-mode.
This change fixes the issue, reported as CPAN RT #70213.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... using defines.
For easy backwards-compatibility of XS modules, we allow XS authors
to use
#define PERL_EUPXS_ALWAYS_EXPORT
or
#define PERL_EUPXS_NEVER_EXPORT
to choose one or the other behaviour. Since "always export" has been
the default behaviour of ExtUtils::ParseXS for virtually ever, defining
PERL_EUPXS_ALWAYS_EXPORT means that you get that behaviour in a very
backwards compatible way (barring a few broken EU::PXS releases).
|
|
|
|
|
|
| |
* avoid vivifying globs in utf8::
* skip caller override completeness check if it would leak
* regularise format of Carp::Heavy for CPAN indexing
|
|
|
|
|
|
|
|
|
| |
Make Carp portable to older Perl versions:
* check minimum Perl version (5.6) at load time
* use || instead of //
* attempt downgrading to avoid loading Unicode tables when that might fail
* check whether utf8::is_utf8() exists before calling it
* lower IPC::Open3 version requirement in Carp tests
|
| |
|
| |
|
|
|
|
|
|
| |
Since these numbers have already been used for developement releases,
they need to be changed again. I also added a note to make sure they
no longer get out of sync with the pod.
|
| |
|
| |
|
|
|
|
|
| |
- For simplicity, use same version number 1.997 in all .pm files to match the
upcoming release 1.997 of the Math-BigInt distribution.
|
|
|
|
|
| |
This stops Pod::Coverage (and possibly users)
from complaining about missing documentation.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
... file when -except is used; write the '\0' escape sequence
properly instead.
|
| |
|
|
|
|
|
| |
This way we get to make use of PAUSE's permission system instead of allowing
everyone to to upload new perlfaq versions.
|
|
|
|
|
|
|
|
| |
With XS(name) defaulting to exporting symbols again since the
previous commit, ExtUtils::ParseXS will now instead use explicit
XS_EXTERNAL/XS_INTERNAL in its place. This allows backporting
of the linkage changes to perls as old as 5.10.0 (and possibly
further).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This restores the ability to have code like this:
ret_type*
foo(bar, baz)
int bar
ThereIsNoTypemapForThisType* baz = somefunc($arg);
CODE:
...
Looks strange and indeed, it is. But it's documented in perlxs
to work, so we can't get away with breaking it. The heuristics
for determining whether to allow this use case is checking for
ST\( or \$arg being found in the initialization. That should take
care of all valid use of this feature and still die horribly in
cases where this is used by mistake (instead of a PREINIT block, etc).
|
|
|
|
|
|
|
|
|
|
| |
Since there have been certain problems with parts of ExtUtils::ParseXS
being shadowed by older installations of the module, this commit adds
an explicit $VERSION to all submodules and requires them to have the
same version as the main module. This doesn't actually fix any problem,
but makes them more apparent as early as possible instead of failing
with obscure compile errors when bad C is generated from the original
XS.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Math::BigRat was trying to copy the sign of a BigRat object into a
BigInt object when converting to an integer, but without taking into
account that the number might be rounded toward zero. This resulted
in a 0 BigInt with a negative sign, which is not actually a valid
BigInt object, as it does not support negative zero.
|
|
|
|
|
| |
A link from the document to itself is not useful.
C<perldoc> should be L<perldoc>.
|
| |
|
|
|
|
| |
Upgrade version in Maintainers.pl.
|
|
|
|
|
|
|
|
|
| |
If we don't get that right, there may be additional semicolons in
the output C code. Those will be interpreted as empty statements
which is a problem for strict/old compilers which require strict
separation of declarations and other code.
Reported by Torsten Schoenfeld, diagnosed by Thorsten and Jan Dubois.
|
| |
|
|
|
|
|
|
| |
If XSUB.h/perl doesn't define the new XS_EXTERNAL macro that we
use for emitting non-static XSUBs for the boot functions, we have
XS_EXTERNAL just fall back to the standard XS macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This can be used to enable/disable the exporting of XSUB symbols.
Technically and at least as far as the documentation change is
concerned, this change goes together with the upcoming change
to XSUB.h to make not exporting the XSUB symbols the default.
It's harmless if a bit useless without that.
In the original plan for making XSUBs "static", there wouldn't have
been a public and easy way to make XSUBs exported from XS code
without resorting to manually redefining macros. But since even in
just the core set of modules, simple things break, I think it's best
to expose this bit of choice.
|
| |
|