X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=doop.c;h=847b18ee9a31e47d6118d501f62d293a7d4e97a5;hb=77d2a6219fa6de3a2a39a89aa5bee27878b9289e;hp=c16318244d4f98ed52b913c7e86165d2cbeb1d02;hpb=cbbf89328f29f925842d180c1410e324b297744d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/doop.c b/doop.c index c163182..847b18e 100644 --- a/doop.c +++ b/doop.c @@ -1,7 +1,7 @@ /* doop.c * * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - * 2000, 2001, 2002, 2004, 2005, by Larry Wall and others + * 2000, 2001, 2002, 2004, 2005, 2006, by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -28,6 +28,7 @@ STATIC I32 S_do_trans_simple(pTHX_ SV *sv) { + dVAR; U8 *s; U8 *d; const U8 *send; @@ -96,6 +97,7 @@ S_do_trans_simple(pTHX_ SV *sv) STATIC I32 S_do_trans_count(pTHX_ SV *sv) { + dVAR; const U8 *s; const U8 *send; I32 matches = 0; @@ -133,6 +135,7 @@ S_do_trans_count(pTHX_ SV *sv) STATIC I32 S_do_trans_complex(pTHX_ SV *sv) { + dVAR; U8 *s; U8 *send; U8 *d; @@ -298,6 +301,7 @@ S_do_trans_complex(pTHX_ SV *sv) STATIC I32 S_do_trans_simple_utf8(pTHX_ SV *sv) { + dVAR; U8 *s; U8 *send; U8 *d; @@ -309,7 +313,7 @@ S_do_trans_simple_utf8(pTHX_ SV *sv) SV* const rv = (SV*)cSVOP->op_sv; HV* const hv = (HV*)SvRV(rv); - SV* const * svp = hv_fetch(hv, "NONE", 4, FALSE); + SV* const * svp = hv_fetchs(hv, "NONE", FALSE); const UV none = svp ? SvUV(*svp) : 0x7fffffff; const UV extra = none + 1; UV final = 0; @@ -333,7 +337,7 @@ S_do_trans_simple_utf8(pTHX_ SV *sv) send = s + len; start = s; - svp = hv_fetch(hv, "FINAL", 5, FALSE); + svp = hv_fetchs(hv, "FINAL", FALSE); if (svp) final = SvUV(*svp); @@ -398,6 +402,7 @@ S_do_trans_simple_utf8(pTHX_ SV *sv) STATIC I32 S_do_trans_count_utf8(pTHX_ SV *sv) { + dVAR; const U8 *s; const U8 *start = NULL; const U8 *send; @@ -406,7 +411,7 @@ S_do_trans_count_utf8(pTHX_ SV *sv) SV* const rv = (SV*)cSVOP->op_sv; HV* const hv = (HV*)SvRV(rv); - SV* const * const svp = hv_fetch(hv, "NONE", 4, FALSE); + SV* const * const svp = hv_fetchs(hv, "NONE", FALSE); const UV none = svp ? SvUV(*svp) : 0x7fffffff; const UV extra = none + 1; U8 hibit = 0; @@ -441,6 +446,7 @@ S_do_trans_count_utf8(pTHX_ SV *sv) STATIC I32 S_do_trans_complex_utf8(pTHX_ SV *sv) { + dVAR; U8 *start, *send; U8 *d; I32 matches = 0; @@ -449,7 +455,7 @@ S_do_trans_complex_utf8(pTHX_ SV *sv) const I32 grows = PL_op->op_private & OPpTRANS_GROWS; SV * const rv = (SV*)cSVOP->op_sv; HV * const hv = (HV*)SvRV(rv); - SV * const *svp = hv_fetch(hv, "NONE", 4, FALSE); + SV * const *svp = hv_fetchs(hv, "NONE", FALSE); const UV none = svp ? SvUV(*svp) : 0x7fffffff; const UV extra = none + 1; UV final = 0; @@ -475,7 +481,7 @@ S_do_trans_complex_utf8(pTHX_ SV *sv) send = s + len; start = s; - svp = hv_fetch(hv, "FINAL", 5, FALSE); + svp = hv_fetchs(hv, "FINAL", FALSE); if (svp) { final = SvUV(*svp); havefinal = TRUE; @@ -602,6 +608,7 @@ S_do_trans_complex_utf8(pTHX_ SV *sv) I32 Perl_do_trans(pTHX_ SV *sv) { + dVAR; STRLEN len; const I32 hasutf = (PL_op->op_private & (OPpTRANS_FROM_UTF|OPpTRANS_TO_UTF)); @@ -650,6 +657,7 @@ Perl_do_trans(pTHX_ SV *sv) void Perl_do_join(pTHX_ register SV *sv, SV *del, register SV **mark, register SV **sp) { + dVAR; SV ** const oldmark = mark; register I32 items = sp - mark; register STRLEN len; @@ -706,6 +714,7 @@ Perl_do_join(pTHX_ register SV *sv, SV *del, register SV **mark, register SV **s void Perl_do_sprintf(pTHX_ SV *sv, I32 len, SV **sarg) { + dVAR; STRLEN patlen; const char * const pat = SvPV_const(*sarg, patlen); bool do_taint = FALSE; @@ -723,6 +732,7 @@ Perl_do_sprintf(pTHX_ SV *sv, I32 len, SV **sarg) UV Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size) { + dVAR; STRLEN srclen, len; const unsigned char *s = (const unsigned char *) SvPV_const(sv, srclen); UV retnum = 0; @@ -861,6 +871,7 @@ Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size) void Perl_do_vecset(pTHX_ SV *sv) { + dVAR; register I32 offset; register I32 size; register unsigned char *s; @@ -942,6 +953,7 @@ Perl_do_vecset(pTHX_ SV *sv) void Perl_do_chop(pTHX_ register SV *astr, register SV *sv) { + dVAR; STRLEN len; char *s; @@ -1017,11 +1029,12 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv) I32 Perl_do_chomp(pTHX_ register SV *sv) { + dVAR; register I32 count; STRLEN len; char *s; char *temp_buffer = NULL; - SV* svrecode = Nullsv; + SV* svrecode = NULL; if (RsSNARF(PL_rs)) return 0; @@ -1152,6 +1165,7 @@ Perl_do_chomp(pTHX_ register SV *sv) void Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) { + dVAR; #ifdef LIBERAL register long *dl; register long *ll; @@ -1343,6 +1357,7 @@ finish: OP * Perl_do_kv(pTHX) { + dVAR; dSP; HV * const hv = (HV*)POPs; HV *keys; @@ -1356,7 +1371,7 @@ Perl_do_kv(pTHX) if (PL_op->op_flags & OPf_MOD || LVRET) { /* lvalue */ dTARGET; /* make sure to clear its target here */ if (SvTYPE(TARG) == SVt_PVLV) - LvTARG(TARG) = Nullsv; + LvTARG(TARG) = NULL; PUSHs(TARG); } RETURN; @@ -1375,7 +1390,7 @@ Perl_do_kv(pTHX) if (PL_op->op_flags & OPf_MOD || LVRET) { /* lvalue */ if (SvTYPE(TARG) < SVt_PVLV) { sv_upgrade(TARG, SVt_PVLV); - sv_magic(TARG, Nullsv, PERL_MAGIC_nkeys, Nullch, 0); + sv_magic(TARG, NULL, PERL_MAGIC_nkeys, NULL, 0); } LvTYPE(TARG) = 'k'; if (LvTARG(TARG) != (SV*)keys) {