| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
encoding doesn't current work.
|
| |
|
| |
|
|
|
|
|
| |
This makes PerlIO::encoding's shared library free of any perl caused RW
static data.
|
|
|
|
|
| |
My moving the 'use Test::More' outside of the BEGIN block, I don't get
the 'duplicate leader seen' error.
|
| |
|
|
|
|
| |
skip_all isn't defined under Test::More.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The dual-life dists affected use Devel::PPPort, so can safely use
newSVpvs() even though it wasn't added until Perl v5.8.9.
|
|
|
|
|
|
|
|
|
|
|
| |
The last Perl release that built with -Dusesfio was v5.8.0, and even that
failed many regression tests. Every subsequent release fails to build, and
in the decade that has passed we have had no bug reports about this. So it's
safe to delete all the code. The Configure related code will be purged in a
subsequent commit.
2 references to sfio intentionally remain in fakesdio.h and nostdio.h, as
these appear to be for using its stdio API-compatibility layer.
|
|
|
|
|
|
| |
As of commit 53a7735b62aee146 (May 2007) Perl_vload_module() wraps its call
to Perl_utilize() with ENTER/LEAVE, so there's no longer a need for callers
of Perl_load_module() to also wrap with ENTER/LEAVE.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PUSHSTACKi() calls SWITCHSTACK(), which sets PL_stack_sp and sp like this:
sp = PL_stack_sp = PL_stack_base + AvFILLp(t)
Hence after PUSHSTACKi() both are identical, so use of SPAGAIN or PUTBACK
to assign one to the other is redundant.
The use of SPAGAIN in encoding.xs and via.xs was added with commit
24f59afc531955e5 (April 2002) which added the use of PUSHSTACKi(). It feels
like cargo-cult.
The use of PUTBACK in Perl_amagic_call() predates the introduction of nested
stacks and PUSHSTACKi() in commit e336de0d01f30cc4 (April 1998). It dates from
perl 5.000, but it's not clear that it was ever needed, as the code in
question looked like this, and nothing could have moved the stack between
the dSP and PUTBACK:
dSP;
BINOP myop;
SV* res;
Zero(&myop, 1, BINOP);
myop.op_last = (OP *) &myop;
myop.op_next = Nullop;
myop.op_flags = OPf_KNOW|OPf_STACKED;
ENTER;
SAVESPTR(op);
op = (OP *) &myop;
PUTBACK;
The PUTBACK and SPAGAIN in Perl_require_pv() were added by commit
d3acc0f7e5197310 (June 1998) which also added the PUSHSTACKi(). They have
both been redundant since they were added.
|
|
|
|
|
|
|
|
|
|
|
| |
There is surely no point in having any of these modules' MANIFEST files in
the core distribution, but other IGNORABLE files should generally stay in
ext/ and lib/ in case they ever get dual-lived (and likewise for modules in
dist/, which are already dual-lived and some of which include even MANIFEST
files, presumably used to roll CPAN releases from).
However, XS-APItest's README file and DBM_Filter's Changes file offer
nothing useful, so remove them.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Commits 667763bdbf and e9a8753af fixed bugs involving buffer realloca-
tions during encode and decode. But what was not taken into account
was that the COW flags could still be left on even when buffer real-
ocations were accounted for. This could result in SvPV_set and
SvLEN_set(sv,0) being called on an SV with the COW flags still on,
so SvPVX would be treated as a key inside a shared_he, resulting in
assertion failures.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 667763bdbf was not good enough.
If the buffer passed to an encode method is reallocated, it may be
smaller than the size (bufsiz) stored inside the encoding layer. So
we need to extend the buffer in that case and make sure the buffer
pointer is not pointing to freed memory.
The test as modified by this commit causes malloc errors on stderr
when I try it without the encoding.xs changes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was trying to figure out why Encode’s perlio.t was sometimes failing
under PERL_OLD_COPY_ON_WRITE (depending on the number of comments in
the source code, or metereological conditions).
I noticed that PerlIO::encoding assumes that the buffer passed to
the encode method will come back SvPOKp. (It accesses SvCUR without
checking any flags.)
That means it can come back as a typeglob, reference, or undefined,
and PerlIO::encoding won’t care. This can result in crashes. Assign-
ing $_[1] = *foo inside an encode method is not a smart thing to do,
but it shouldn’t crash.
PerlIO::encoding was also assuming that SvPVX would not change between
calls to encode. It is very easy to reallocate it. This means the
internal buffer used by the encoding layer (which is owned by the
SV buffer passed to the encode method) can be freed and still subse-
quently written too, which is not good.
This commit makes PerlIO::encoding force stringification of the value
returned. If it does not match its internal buffer pointers, it
resets them based on the buffer SV.
This probably makes Encode pass its tests under
PERL_OLD_COPY_ON_WRITE, but I have yet to confirm it. Encoding mod-
ules are expected to write to the buffer ($_[1] = '') in certain
cases. If COW is enabled, that would cause the buffer’s SvPVX to
point to the same string as the rhs, which would explain why the lack
of accounting for SvPVX changes caused test failures under
PERL_OLD_COPY_ON_WRITE.
|
|
|
|
| |
1c2e8ccaafb0b2b1 fixed a typo in a comment in the XS code.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
All files have been modified more recently than their tag, rendering
information in the tag redundant.
|
|
|
|
|
|
|
|
|
|
|
| |
Trivial changes to fix warnings of types
* unclear precedence
* assignment as conditional
* signed/unsigned mixing
* unused parameter/variable
* value computed not used
* wrong argument type for a printf format
* variable may be used uninitialised (due to unhandled switch case)
|
| |
|
|
|
|
| |
Remove one vestigial mention of MacOS.
|
| |
|
|
|
|
| |
Make them mandatory warnings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by, and in parts borrows from, Schwern's branch on github, but takes a
slightly different approach in places.
Not quite perfect yet - ext/File-Glob still runs from t, at least one FIXME
needs fixing, and the changes to dual-life modules' tests need to be filtered
back upstream, and possibly modified to suit their respective authors.
But it works.
|
| |
|
|
|