summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/op.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-05-24 18:36:42 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-05-24 18:36:42 +0000
commit8bab8b19946f98d4be49345ca9c42e56674b65fb (patch)
treebd62d7b5d463fab205d08914b30ba647eb3c8bc8 /gnu/usr.bin/perl/op.h
parent483d4e680bd2a6db14835b1b4d65be33488d532b (diff)
merge in perl 5.6.1 with our local changes
Diffstat (limited to 'gnu/usr.bin/perl/op.h')
-rw-r--r--gnu/usr.bin/perl/op.h31
1 files changed, 12 insertions, 19 deletions
diff --git a/gnu/usr.bin/perl/op.h b/gnu/usr.bin/perl/op.h
index 081d10c0e88..e2699346c38 100644
--- a/gnu/usr.bin/perl/op.h
+++ b/gnu/usr.bin/perl/op.h
@@ -1,6 +1,6 @@
/* op.h
*
- * Copyright (c) 1991-2000, Larry Wall
+ * Copyright (c) 1991-2001, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
@@ -55,7 +55,7 @@ typedef U32 PADOFFSET;
/*
=for apidoc Amn|U32|GIMME_V
The XSUB-writer's equivalent to Perl's C<wantarray>. Returns C<G_VOID>,
-C<G_SCALAR> or C<G_ARRAY> for void, scalar or array context,
+C<G_SCALAR> or C<G_ARRAY> for void, scalar or list context,
respectively.
=for apidoc Amn|U32|GIMME
@@ -94,7 +94,8 @@ Deprecated. Use C<GIMME_V> instead.
/* On OP_EXISTS, treat av as av, not avhv. */
/* On OP_(ENTER|LEAVE)EVAL, don't clear $@ */
/* On OP_ENTERITER, loop var is per-thread */
- /* On pushre, re is /\s+/ imp. by split " " */
+ /* On pushre, re is /\s+/ imp. by split " " */
+ /* On regcomp, "use re 'eval'" was in scope */
/* old names; don't use in new code, but don't break them, either */
#define OPf_LIST OPf_WANT_LIST
@@ -129,9 +130,7 @@ Deprecated. Use C<GIMME_V> instead.
/* Private for OP_TRANS */
#define OPpTRANS_FROM_UTF 1
#define OPpTRANS_TO_UTF 2
-#define OPpTRANS_IDENTICAL 4
- /* When CU or UC, means straight latin-1 to utf-8 or vice versa */
- /* Otherwise, IDENTICAL means the right side is the same as the left */
+#define OPpTRANS_IDENTICAL 4 /* right side is same as left */
#define OPpTRANS_SQUASH 8
#define OPpTRANS_DELETE 16
#define OPpTRANS_COMPLEMENT 32
@@ -140,9 +139,6 @@ Deprecated. Use C<GIMME_V> instead.
/* Private for OP_REPEAT */
#define OPpREPEAT_DOLIST 64 /* List replication. */
-/* Private for OP_LEAVELOOP */
-#define OPpLOOP_CONTINUE 64 /* a continue block is present */
-
/* Private for OP_RV2?V, OP_?ELEM */
#define OPpDEREF (32|64) /* Want ref to something: */
#define OPpDEREF_AV 32 /* Want ref to AV. */
@@ -160,7 +156,9 @@ Deprecated. Use C<GIMME_V> instead.
/* OP_?ELEM only */
#define OPpLVAL_DEFER 16 /* Defer creation of array/hash elem */
/* OP_RV2?V, OP_GVSV only */
-#define OPpOUR_INTRO 16 /* Defer creation of array/hash elem */
+#define OPpOUR_INTRO 16 /* Variable was in an our() */
+ /* OP_RV2[AH]V, OP_PAD[AH]V, OP_[AH]ELEM */
+#define OPpMAYBE_LVSUB 8 /* We might be an lvalue to return */
/* for OP_RV2?V, lower bits carry hints (currently only HINT_STRICT_REFS) */
/* Private for OPs with TARGLEX */
@@ -231,14 +229,12 @@ struct listop {
BASEOP
OP * op_first;
OP * op_last;
- U32 op_children;
};
struct pmop {
BASEOP
OP * op_first;
OP * op_last;
- U32 op_children;
OP * op_pmreplroot;
OP * op_pmreplstart;
PMOP * op_pmnext; /* list of all scanpats */
@@ -291,7 +287,6 @@ struct loop {
BASEOP
OP * op_first;
OP * op_last;
- U32 op_children;
OP * op_redoop;
OP * op_nextop;
OP * op_lastop;
@@ -415,19 +410,17 @@ struct loop {
# define OP_REFCNT_LOCK MUTEX_LOCK(&PL_op_mutex)
# define OP_REFCNT_UNLOCK MUTEX_UNLOCK(&PL_op_mutex)
# define OP_REFCNT_TERM MUTEX_DESTROY(&PL_op_mutex)
-# define OpREFCNT_set(o,n) ((o)->op_targ = (n))
-# define OpREFCNT_inc(o) ((o) ? (++(o)->op_targ, (o)) : Nullop)
-# define OpREFCNT_dec(o) (--(o)->op_targ)
#else
# define OP_REFCNT_INIT NOOP
# define OP_REFCNT_LOCK NOOP
# define OP_REFCNT_UNLOCK NOOP
# define OP_REFCNT_TERM NOOP
-# define OpREFCNT_set(o,n) NOOP
-# define OpREFCNT_inc(o) (o)
-# define OpREFCNT_dec(o) 0
#endif
+#define OpREFCNT_set(o,n) ((o)->op_targ = (n))
+#define OpREFCNT_inc(o) ((o) ? (++(o)->op_targ, (o)) : Nullop)
+#define OpREFCNT_dec(o) (--(o)->op_targ)
+
/* flags used by Perl_load_module() */
#define PERL_LOADMOD_DENY 0x1
#define PERL_LOADMOD_NOIMPORT 0x2