diff options
author | Yves Orton <demerphq@gmail.com> | 2006-05-21 17:06:20 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-05-22 14:49:05 +0000 |
commit | 188f0c84c39131341bfb7749b35facb3de682e0f (patch) | |
tree | ef70cd217dece9e178be1da20072e3b5e3f413b1 /perlio.c | |
parent | 41b994da4e3577414d4dc63b509f70f6de8273bd (diff) | |
download | perl-188f0c84c39131341bfb7749b35facb3de682e0f.tar.gz |
Perl_PerlIO_context_layers and PerlIO_apply_layers, as well as other unexported/undefined entities... (patch 28258/28264 incomplete?)
Message-ID: <9b18b3110605210606l441b69b3lf6934a15d9a26e4b@mail.gmail.com>
(only the makedef.pl and perlio.c patches)
p4raw-id: //depot/perl@28275
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 59 |
1 files changed, 30 insertions, 29 deletions
@@ -1408,35 +1408,6 @@ Perl_PerlIO_fileno(pTHX_ PerlIO *f) Perl_PerlIO_or_Base(f, Fileno, fileno, -1, (aTHX_ f)); } -const char * -Perl_PerlIO_context_layers(pTHX_ const char *mode) -{ - dVAR; - const char *type = NULL; - /* - * Need to supply default layer info from open.pm - */ - if (PL_curcop && PL_curcop->cop_hints & HINT_LEXICAL_IO) { - SV * const layers - = Perl_refcounted_he_fetch(aTHX_ PL_curcop->cop_hints_hash, 0, - "open", 4, 0, 0); - assert(layers); - if (SvOK(layers)) { - STRLEN len; - type = SvPV_const(layers, len); - if (type && mode && mode[0] != 'r') { - /* - * Skip to write part, which is separated by a '\0' - */ - STRLEN read_len = strlen(type); - if (read_len < len) { - type += read_len + 1; - } - } - } - } - return type; -} static PerlIO_funcs * PerlIO_layer_from_ref(pTHX_ SV *sv) @@ -5055,6 +5026,36 @@ PerlIO_tmpfile(void) * Now some functions in terms of above which may be needed even if we are * not in true PerlIO mode */ +const char * +Perl_PerlIO_context_layers(pTHX_ const char *mode) +{ + dVAR; + const char *type = NULL; + /* + * Need to supply default layer info from open.pm + */ + if (PL_curcop && PL_curcop->cop_hints & HINT_LEXICAL_IO) { + SV * const layers + = Perl_refcounted_he_fetch(aTHX_ PL_curcop->cop_hints_hash, 0, + "open", 4, 0, 0); + assert(layers); + if (SvOK(layers)) { + STRLEN len; + type = SvPV_const(layers, len); + if (type && mode && mode[0] != 'r') { + /* + * Skip to write part, which is separated by a '\0' + */ + STRLEN read_len = strlen(type); + if (read_len < len) { + type += read_len + 1; + } + } + } + } + return type; +} + #ifndef HAS_FSETPOS #undef PerlIO_setpos |