diff options
author | Zefram <zefram@fysh.org> | 2010-10-04 22:19:08 +0100 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-12 12:52:12 -0700 |
commit | 2fcb4757c157c580cb9ddfcd3da7f1b3795d62a8 (patch) | |
tree | c1bd54a7dfc6549029adacc483327aa128f32dab /toke.c | |
parent | d056e33c1ea02abb0c031adb18b181624282ba3c (diff) | |
download | perl-2fcb4757c157c580cb9ddfcd3da7f1b3795d62a8.tar.gz |
APIify op list constructors
Put into the API op_append_elem, op_prepend_elem, and op_append_list. All
renamed from op_-less internal names. Parameter types for op_append_list
changed to match the rest of the op API and avoid some casting.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -3952,7 +3952,7 @@ S_readpipe_override(pTHX) && GvCVu(gv_readpipe) && GvIMPORTED_CV(gv_readpipe))) { PL_lex_op = (OP*)newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, + op_append_elem(OP_LIST, newSVOP(OP_CONST, 0, &PL_sv_undef), /* value will be read later */ newCVREF(0, newGVOP(OP_GV, 0, gv_readpipe)))); } @@ -5247,7 +5247,7 @@ Perl_yylex(pTHX) } if (PL_lex_stuff) { sv_catsv(sv, PL_lex_stuff); - attrs = append_elem(OP_LIST, attrs, + attrs = op_append_elem(OP_LIST, attrs, newSVOP(OP_CONST, 0, sv)); SvREFCNT_dec(PL_lex_stuff); PL_lex_stuff = NULL; @@ -5287,7 +5287,7 @@ Perl_yylex(pTHX) justified by the performance win for the common case of applying only built-in attributes.) */ else - attrs = append_elem(OP_LIST, attrs, + attrs = op_append_elem(OP_LIST, attrs, newSVOP(OP_CONST, 0, sv)); } @@ -7363,7 +7363,7 @@ Perl_yylex(pTHX) /**/; } sv = newSVpvn_utf8(b, d-b, DO_UTF8(PL_lex_stuff)); - words = append_elem(OP_LIST, words, + words = op_append_elem(OP_LIST, words, newSVOP(OP_CONST, 0, tokeq(sv))); } } @@ -12530,7 +12530,7 @@ S_scan_inputsymbol(pTHX_ char *start) o->op_targ = tmp; PL_lex_op = readline_overriden ? (OP*)newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, o, + op_append_elem(OP_LIST, o, newCVREF(0, newGVOP(OP_GV,0,gv_readline)))) : (OP*)newUNOP(OP_READLINE, 0, o); } @@ -12546,7 +12546,7 @@ intro_sym: SVt_PV); PL_lex_op = readline_overriden ? (OP*)newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, + op_append_elem(OP_LIST, newUNOP(OP_RV2SV, 0, newGVOP(OP_GV, 0, gv)), newCVREF(0, newGVOP(OP_GV, 0, gv_readline)))) : (OP*)newUNOP(OP_READLINE, 0, @@ -12565,7 +12565,7 @@ intro_sym: GV * const gv = gv_fetchpv(d, GV_ADD, SVt_PVIO); PL_lex_op = readline_overriden ? (OP*)newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, + op_append_elem(OP_LIST, newGVOP(OP_GV, 0, gv), newCVREF(0, newGVOP(OP_GV, 0, gv_readline)))) : (OP*)newUNOP(OP_READLINE, 0, newGVOP(OP_GV, 0, gv)); |