diff options
author | Richard Soderberg <p5-authors@crystalflame.net> | 2001-01-11 20:49:35 -0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-12 15:42:06 +0000 |
commit | b78ba3cc234763c7deff02f1d759b76b3a9ce5d1 (patch) | |
tree | d4636716f50f53f7a09f5b40c2ed204976ec215d /op.c | |
parent | 699c3c3425f2b312fd24050e39cded6eb124bea2 (diff) | |
download | perl-b78ba3cc234763c7deff02f1d759b76b3a9ce5d1.tar.gz |
RE: [PATCH] [ID 20001223.002] lvalues in list context
Message-ID: <NAEKLNAAHLMBPMPNBMLEAELDCKAA.rs@crystalflame.net>
Replace 10000 with RETVAL_MAX, and compute RETVAL_MAX
according to the platform.
p4raw-id: //depot/perl@8416
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -55,6 +55,7 @@ S_Slab_Alloc(pTHX_ int m, size_t sz) : CALL_FPTR(PL_check[type])(aTHX_ (OP*)o)) #define PAD_MAX 999999999 +#define RETVAL_MAX ( PERL_INT_MAX / 2 ) STATIC char* S_gv_ename(pTHX_ GV *gv) @@ -1549,7 +1550,7 @@ Perl_mod(pTHX_ OP *o, I32 type) if (!type && cUNOPo->op_first->op_type != OP_GV) Perl_croak(aTHX_ "Can't localize through a reference"); if (type == OP_REFGEN && o->op_flags & OPf_PARENS) { - PL_modcount = 10000; + PL_modcount = RETVAL_MAX; return o; /* Treat \(@foo) like ordinary list. */ } /* FALL THROUGH */ @@ -1565,7 +1566,7 @@ Perl_mod(pTHX_ OP *o, I32 type) case OP_DBSTATE: case OP_REFGEN: case OP_CHOMP: - PL_modcount = 10000; + PL_modcount = RETVAL_MAX; break; case OP_RV2SV: if (!type && cUNOPo->op_first->op_type != OP_GV) @@ -1584,7 +1585,7 @@ Perl_mod(pTHX_ OP *o, I32 type) case OP_PADAV: case OP_PADHV: - PL_modcount = 10000; + PL_modcount = RETVAL_MAX; if (type == OP_REFGEN && o->op_flags & OPf_PARENS) return o; /* Treat \(@foo) like ordinary list. */ if (scalar_mod_type(o, type)) @@ -3502,7 +3503,7 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right) } } else { - if (PL_modcount < 10000 && + if (PL_modcount < RETVAL_MAX && ((LISTOP*)right)->op_last->op_type == OP_CONST) { SV *sv = ((SVOP*)((LISTOP*)right)->op_last)->op_sv; |