diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-06-23 21:48:07 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-06-24 08:19:26 -0700 |
commit | d3d7d28f48f0f4ec3f5cf5d018255ea731f01f56 (patch) | |
tree | efd138ff1d329dceb01d8831d5a3efdbc0cf86fc | |
parent | 63983e4c95135b2dd0fa466c28136f053046a340 (diff) | |
download | perl-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.fnc | 3 | ||||
-rw-r--r-- | embed.h | 1 | ||||
-rw-r--r-- | global.sym | 2 | ||||
-rw-r--r-- | op.c | 2 | ||||
-rw-r--r-- | op.h | 2 | ||||
-rw-r--r-- | proto.h | 3 |
6 files changed, 8 insertions, 5 deletions
@@ -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 @@ -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 @@ -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; @@ -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 @@ -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 \ |