diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2001-07-02 07:12:10 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2001-07-02 07:12:10 +0000 |
commit | 25716404fbbde2ca91832aab8c9157aafcdcc7e8 (patch) | |
tree | 373243337e32a41b725e311b058e5b7c3ff247b1 /op.c | |
parent | 8337181f54c3501595fb014edfb15b1033b90568 (diff) | |
download | perl-25716404fbbde2ca91832aab8c9157aafcdcc7e8.tar.gz |
win32 fixes: fix various syntax errors ("no preprocessor directives
within macro arguments") and warnings ("unary minus applied to
unsigned type", among others)
p4raw-id: //depot/perl@11066
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -6901,9 +6901,9 @@ Perl_peep(pTHX_ register OP *o) svp = cSVOPx_svp(((BINOP*)o)->op_last); if ((!SvFAKE(sv = *svp) || !SvREADONLY(sv)) && !IS_PADCONST(sv)) { key = SvPV(sv, keylen); - if (SvUTF8(sv)) - keylen = -keylen; - lexname = newSVpvn_share(key, keylen, 0); + lexname = newSVpvn_share(key, + SvUTF8(sv) ? -(I32)keylen : keylen, + 0); SvREFCNT_dec(sv); *svp = lexname; } @@ -6921,9 +6921,8 @@ Perl_peep(pTHX_ register OP *o) if (!fields || !GvHV(*fields)) break; key = SvPV(*svp, keylen); - if (SvUTF8(*svp)) - keylen = -keylen; - indsvp = hv_fetch(GvHV(*fields), key, keylen, FALSE); + indsvp = hv_fetch(GvHV(*fields), key, + SvUTF8(*svp) ? -(I32)keylen : keylen, FALSE); if (!indsvp) { Perl_croak(aTHX_ "No such pseudo-hash field \"%s\" in variable %s of type %s", key, SvPV(lexname, n_a), HvNAME(SvSTASH(lexname))); @@ -6988,9 +6987,8 @@ Perl_peep(pTHX_ register OP *o) key_op = (SVOP*)key_op->op_sibling) { svp = cSVOPx_svp(key_op); key = SvPV(*svp, keylen); - if (SvUTF8(*svp)) - keylen = -keylen; - indsvp = hv_fetch(GvHV(*fields), key, keylen, FALSE); + indsvp = hv_fetch(GvHV(*fields), key, + SvUTF8(*svp) ? -(I32)keylen : keylen, FALSE); if (!indsvp) { Perl_croak(aTHX_ "No such pseudo-hash field \"%s\" " "in variable %s of type %s", |