summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2014-10-27 14:35:53 +1100
committerTony Cook <tony@develop-help.com>2014-10-27 14:35:53 +1100
commit0987d6f3c0887ebe1a7db4d50e4827861bbb34e7 (patch)
tree678f975e6d1f24ec37c76ed4fe84eadddd874b1c /perlio.c
parente4e95921cd0fd085a5edf35ae358cd213529e55a (diff)
downloadperl-0987d6f3c0887ebe1a7db4d50e4827861bbb34e7.tar.gz
PerlIO_list_push() accepts a non-const PerlIO_funcs pointer
but under -DPERL_GLOBAL_STRUCT_PRIVATE, most PerlIO_funcs objects and pointers are const, so cast to match the function parameter. This was broken by f814d560e84f which changed from looking up the layer by the name in tab (or osLayer) to adding those directly.
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/perlio.c b/perlio.c
index b16384953f..7eac37feb0 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1003,7 +1003,7 @@ PerlIO_default_buffer(pTHX_ PerlIO_list_t *av)
tab = &PerlIO_stdio;
#endif
PerlIO_debug("Pushing %s\n", tab->name);
- PerlIO_list_push(aTHX_ av, tab, &PL_sv_undef);
+ PerlIO_list_push(aTHX_ av, (PerlIO_funcs *)tab, &PL_sv_undef);
}
SV *
@@ -1091,7 +1091,8 @@ PerlIO_default_layers(pTHX)
PerlIO_define_layer(aTHX_ PERLIO_FUNCS_CAST(&PerlIO_utf8));
PerlIO_define_layer(aTHX_ PERLIO_FUNCS_CAST(&PerlIO_remove));
PerlIO_define_layer(aTHX_ PERLIO_FUNCS_CAST(&PerlIO_byte));
- PerlIO_list_push(aTHX_ PL_def_layerlist, osLayer, &PL_sv_undef);
+ PerlIO_list_push(aTHX_ PL_def_layerlist, (PerlIO_funcs *)osLayer,
+ &PL_sv_undef);
if (s) {
PerlIO_parse_layers(aTHX_ PL_def_layerlist, s);
}