summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorLeon Timmermans <fawaka@gmail.com>2011-04-07 12:33:21 +0200
committerFather Chrysostomos <sprout@cpan.org>2011-04-07 07:56:09 -0700
commita778d1f5c1a446254887ec8addb0044ba74ea05a (patch)
tree5512cd635de53bbd502def8c19b36ec13fcd250d /perlio.c
parent4c34a6936037142444c003aac9d374ea84e5a195 (diff)
downloadperl-a778d1f5c1a446254887ec8addb0044ba74ea05a.tar.gz
Make :utf8 and :bytes MULTIARG
PerlIO layer types have this property that flags if they can accept multiple arguments or only one. Unfortunately, this always checks the uppermost layer that has an Open method defined. This causes issues when used with utf8 or bytes on top of a layer that uses multiple arguments. For 5.15 I think abolishing this feature may make most sense. It's just flat out wrong IMO, it's the layer that uses the arguments that should validate them, not the topmost, which may not even touch them. In the mean time adding the multiargs flag to :utf8 and :bytes is a reasonable stop-gap. This patch makes perl slightly more permissive, so it shouldn't break any working code out there.
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/perlio.c b/perlio.c
index f2f8729567..e42a78fc28 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1963,7 +1963,7 @@ PERLIO_FUNCS_DECL(PerlIO_utf8) = {
sizeof(PerlIO_funcs),
"utf8",
0,
- PERLIO_K_DUMMY | PERLIO_K_UTF8,
+ PERLIO_K_DUMMY | PERLIO_K_UTF8 | PERLIO_K_MULTIARG,
PerlIOUtf8_pushed,
NULL,
PerlIOBase_open,
@@ -1994,7 +1994,7 @@ PERLIO_FUNCS_DECL(PerlIO_byte) = {
sizeof(PerlIO_funcs),
"bytes",
0,
- PERLIO_K_DUMMY,
+ PERLIO_K_DUMMY | PERLIO_K_MULTIARG,
PerlIOUtf8_pushed,
NULL,
PerlIOBase_open,