[perl #78908] Reinstate mod for one more stable release
authorFather Chrysostomos <sprout@cpan.org>
Fri, 26 Nov 2010 23:52:54 +0000 (15:52 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 26 Nov 2010 23:57:42 +0000 (15:57 -0800)
embed.fnc
embed.h
global.sym
op.c
proto.h

index cf22c78..9effd6b 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -735,6 +735,8 @@ 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
+: 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
 p      |int    |mode_from_discipline|NULLOK const char* s|STRLEN len
 Ap     |const char*    |moreswitches   |NN const char* s
diff --git a/embed.h b/embed.h
index 09c7fb1..441b6a5 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define is_utf8_X_extend(a)    Perl_is_utf8_X_extend(aTHX_ a)
 #define is_utf8_X_non_hangul(a)        Perl_is_utf8_X_non_hangul(aTHX_ a)
 #define is_utf8_X_prepend(a)   Perl_is_utf8_X_prepend(aTHX_ a)
+#define mod(a,b)               Perl_mod(aTHX_ a,b)
 #define op_clear(a)            Perl_op_clear(aTHX_ a)
 #define qerror(a)              Perl_qerror(aTHX_ a)
 #define reg_named_buff(a,b,c,d)        Perl_reg_named_buff(aTHX_ a,b,c,d)
index 2248d59..007ed52 100644 (file)
@@ -318,6 +318,7 @@ Perl_mg_magical
 Perl_mg_set
 Perl_mg_size
 Perl_mini_mktime
+Perl_mod
 Perl_moreswitches
 Perl_mro_get_from_name
 Perl_mro_get_linear_isa
diff --git a/op.c b/op.c
index 2da3db4..53641c7 100644 (file)
--- a/op.c
+++ b/op.c
@@ -1784,6 +1784,14 @@ Perl_op_lvalue(pTHX_ OP *o, I32 type)
     return o;
 }
 
+/* Do not use this. It will be removed after 5.14. */
+OP *
+Perl_mod(pTHX_ OP *o, I32 type)
+{
+    return op_lvalue(o,type);
+}
+
+
 STATIC bool
 S_scalar_mod_type(const OP *o, I32 type)
 {
diff --git a/proto.h b/proto.h
index 6b3fe77..096e84f 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -2247,6 +2247,7 @@ PERL_CALLCONV void        Perl_mini_mktime(pTHX_ struct tm *ptm)
 #define PERL_ARGS_ASSERT_MINI_MKTIME   \
        assert(ptm)
 
+PERL_CALLCONV OP*      Perl_mod(pTHX_ OP* o, I32 type);
 PERL_CALLCONV int      Perl_mode_from_discipline(pTHX_ const char* s, STRLEN len);
 PERL_CALLCONV void *   Perl_more_bodies(pTHX_ const svtype sv_type, const size_t body_size, const size_t arena_size);
 PERL_CALLCONV const char*      Perl_moreswitches(pTHX_ const char* s)