Front page | perl.perl5.changes |
Postings from December 2008
Change 35004: Integrate:
From:
Dave Mitchell
Date:
December 3, 2008 16:45
Subject:
Change 35004: Integrate:
Change 35004 by davem@davem-pigeon on 2008/12/04 00:32:41
Integrate:
[ 34025]
Fix for bug [perl #54934] Attempt to free unreferenced scalar fiddling with the symbol table
Keep the refcount of the globs generated by PerlIO::via balanced.
[ 34026]
Small typo fix.
[ 34779]
Make sure PerlIO::via doesn't leave its old GV's hanging
in the stash they were created in. Steal the idea from
IO::File to just delete the stash entry after creating
the GV.
This fixes perl #59268.
Affected files ...
... //depot/maint-5.10/perl/ext/PerlIO/via/via.pm#3 integrate
... //depot/maint-5.10/perl/ext/PerlIO/via/via.xs#3 integrate
Differences ...
==== //depot/maint-5.10/perl/ext/PerlIO/via/via.pm#3 (text) ====
Index: perl/ext/PerlIO/via/via.pm
--- perl/ext/PerlIO/via/via.pm#2~33640~ 2008-04-03 09:03:24.000000000 -0700
+++ perl/ext/PerlIO/via/via.pm 2008-12-03 16:32:41.000000000 -0800
@@ -1,5 +1,5 @@
package PerlIO::via;
-our $VERSION = '0.05';
+our $VERSION = '0.07';
use XSLoader ();
XSLoader::load 'PerlIO::via';
1;
@@ -150,7 +150,7 @@
=item $obj->TELL($fh)
-Returns file postion.
+Returns file position.
Optional. Default to be determined.
=item $obj->UNREAD($buffer,$fh)
@@ -228,7 +228,7 @@
1;
-the following code opens up an output handle that will convert any
+The following code opens up an output handle that will convert any
output to hexadecimal dump of the output bytes: for example "A" will
be converted to "41" (on ASCII-based machines, on EBCDIC platforms
the "A" will become "c1")
==== //depot/maint-5.10/perl/ext/PerlIO/via/via.xs#3 (text) ====
Index: perl/ext/PerlIO/via/via.xs
--- perl/ext/PerlIO/via/via.xs#2~33161~ 2008-01-31 14:14:13.000000000 -0800
+++ perl/ext/PerlIO/via/via.xs 2008-12-03 16:32:41.000000000 -0800
@@ -89,8 +89,12 @@
if (!s->fh) {
GV *gv = newGVgen(HvNAME_get(s->stash));
GvIOp(gv) = newIO();
- s->fh = newRV_noinc((SV *) gv);
+ s->fh = newRV((SV *) gv);
s->io = GvIOp(gv);
+ if (gv) {
+ /* shamelessly stolen from IO::File's new_tmpfile() */
+ hv_delete(GvSTASH(gv), GvNAME(gv), GvNAMELEN(gv), G_DISCARD);
+ }
}
IoIFP(s->io) = PerlIONext(f);
IoOFP(s->io) = PerlIONext(f);
End of Patch.
-
Change 35004: Integrate:
by Dave Mitchell