* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
*
+ * Control ops (cops) are one of the three ops OP_NEXTSTATE, OP_DBSTATE,
+ * and OP_SETSTATE that (loosely speaking) separate statements. They hold
+ * imformation important for lexical state and error reporting. At run
+ * time, PL_curcop is set to point to the most recently executed cop,
+ * and thus can be used to determine our current state.
*/
struct cop {
CV * cv;
GV * gv;
GV * dfoutgv;
-#ifndef USE_5005THREADS
AV * savearray;
-#endif /* USE_5005THREADS */
AV * argarray;
long olddepth;
U8 hasargs;
U8 lval; /* XXX merge lval and hasargs? */
- PAD oldcurpad;
+ PAD *oldcomppad;
};
#define PUSHSUB(cx) \
cx->blk_sub.dfoutgv = PL_defoutgv; \
(void)SvREFCNT_inc(cx->blk_sub.dfoutgv)
-#ifdef USE_5005THREADS
-# define POP_SAVEARRAY() NOOP
-#else
-# define POP_SAVEARRAY() \
+#define POP_SAVEARRAY() \
STMT_START { \
SvREFCNT_dec(GvAV(PL_defgv)); \
GvAV(PL_defgv) = cx->blk_sub.savearray; \
} STMT_END
-#endif /* USE_5005THREADS */
/* junk in @_ spells trouble when cloning CVs and in pp_caller(), so don't
* leave any (a fast av_clear(ary), basically) */
OP * last_op;
#ifdef USE_ITHREADS
void * iterdata;
- PAD oldcurpad;
+ PAD *oldcomppad;
#else
SV ** itervar;
#endif