summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-06-23 21:48:07 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-06-24 08:19:26 -0700
commitd3d7d28f48f0f4ec3f5cf5d018255ea731f01f56 (patch)
treeefd138ff1d329dceb01d8831d5a3efdbc0cf86fc
parent63983e4c95135b2dd0fa466c28136f053046a340 (diff)
downloadperl-d3d7d28f48f0f4ec3f5cf5d018255ea731f01f56.tar.gz
op_lvalue .= _flags
Add flags param to op_lvalue, so that the caller can ask it not to croak when encountering an unmodifiable op (upcoming). This is in preparation for making the \$ prototype accept any lvalue. There is no mathom, as the changes that this will support are by no means suitable for maint.
-rw-r--r--embed.fnc3
-rw-r--r--embed.h1
-rw-r--r--global.sym2
-rw-r--r--op.c2
-rw-r--r--op.h2
-rw-r--r--proto.h3
6 files changed, 8 insertions, 5 deletions
diff --git a/embed.fnc b/embed.fnc
index 71c10af6d7..d9a888a168 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -751,7 +751,8 @@ Apd |void |mg_magical |NN SV* sv
Apd |int |mg_set |NN SV* sv
Ap |I32 |mg_size |NN SV* sv
Ap |void |mini_mktime |NN struct tm *ptm
-AMpd |OP* |op_lvalue |NULLOK OP* o|I32 type
+AMmd |OP* |op_lvalue |NULLOK OP* o|I32 type
+poX |OP* |op_lvalue_flags|NULLOK OP* o|I32 type|U32 flags
: To be removed after 5.14 (see [perl #78908]):
EXp |OP* |mod |NULLOK OP* o|I32 type
: Used in op.c and pp_sys.c
diff --git a/embed.h b/embed.h
index 77373e1b01..e2428c98e1 100644
--- a/embed.h
+++ b/embed.h
@@ -375,7 +375,6 @@
#define op_dump(a) Perl_op_dump(aTHX_ a)
#define op_free(a) Perl_op_free(aTHX_ a)
#define op_linklist(a) Perl_op_linklist(aTHX_ a)
-#define op_lvalue(a,b) Perl_op_lvalue(aTHX_ a,b)
#define op_null(a) Perl_op_null(aTHX_ a)
#define op_prepend_elem(a,b,c) Perl_op_prepend_elem(aTHX_ a,b,c)
#define op_refcnt_lock() Perl_op_refcnt_lock(aTHX)
diff --git a/global.sym b/global.sym
index 89fb825745..30614c4e38 100644
--- a/global.sym
+++ b/global.sym
@@ -426,7 +426,7 @@ Perl_op_contextualize
Perl_op_dump
Perl_op_free
Perl_op_linklist
-Perl_op_lvalue
+Perl_op_lvalue_flags
Perl_op_null
Perl_op_prepend_elem
Perl_op_refcnt_lock
diff --git a/op.c b/op.c
index e5780e323e..5cb6392c13 100644
--- a/op.c
+++ b/op.c
@@ -1424,7 +1424,7 @@ such as C<$$x = 5> which might have to vivify a reference in C<$x>.
*/
OP *
-Perl_op_lvalue(pTHX_ OP *o, I32 type)
+Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
{
dVAR;
OP *kid;
diff --git a/op.h b/op.h
index 0d03efda6f..24463a8fd4 100644
--- a/op.h
+++ b/op.h
@@ -763,6 +763,8 @@ preprocessing token; the type of I<arg> depends on I<which>.
#define RV2CVOPCV_MARK_EARLY 0x00000001
#define RV2CVOPCV_RETURN_NAME_GV 0x00000002
+#define op_lvalue(op,t) Perl_op_lvalue_flags(aTHX_ op,t,0)
+
/*
=head1 Custom Operators
diff --git a/proto.h b/proto.h
index 9d47ba5c85..8fc49deea1 100644
--- a/proto.h
+++ b/proto.h
@@ -2765,7 +2765,8 @@ PERL_CALLCONV OP* Perl_op_linklist(pTHX_ OP *o)
#define PERL_ARGS_ASSERT_OP_LINKLIST \
assert(o)
-PERL_CALLCONV OP* Perl_op_lvalue(pTHX_ OP* o, I32 type);
+/* PERL_CALLCONV OP* op_lvalue(pTHX_ OP* o, I32 type); */
+PERL_CALLCONV OP* Perl_op_lvalue_flags(pTHX_ OP* o, I32 type, U32 flags);
PERL_CALLCONV void Perl_op_null(pTHX_ OP* o)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_OP_NULL \