Change 34963 by [EMAIL PROTECTED] on 2008/12/01 09:46:15

        Expose save_pushi32ptr() and implement SAVECOPARYBASE() with it.

Affected files ...

... //depot/perl/embed.fnc#660 edit
... //depot/perl/embed.h#793 edit
... //depot/perl/proto.h#991 edit
... //depot/perl/scope.c#241 edit
... //depot/perl/scope.h#98 edit

Differences ...

==== //depot/perl/embed.fnc#660 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#659~34960~   2008-11-30 16:02:17.000000000 -0800
+++ perl/embed.fnc      2008-12-01 01:46:15.000000000 -0800
@@ -923,9 +923,8 @@
 Ap     |void   |save_sptr      |NN SV** sptr
 Ap     |SV*    |save_svref     |NN SV** sptr
 Ap     |void   |save_pushptr   |NULLOK void *const ptr|const int type
-#if defined(PERL_IN_SCOPE_C)
-s      |void   |save_pushi32ptr|I32 i|NULLOK void *const ptr|const int type
-#endif
+: Used by SAVECOPARYBASE() in op.c
+p      |void   |save_pushi32ptr|I32 i|NULLOK void *const ptr|const int type
 : Used by SAVESWITCHSTACK() in pp.c
 p      |void   |save_pushptrptr|NULLOK void *const ptr1 \
                                |NULLOK void *const ptr2|const int type

==== //depot/perl/embed.h#793 (text+w) ====
Index: perl/embed.h
--- perl/embed.h#792~34960~     2008-11-30 16:02:17.000000000 -0800
+++ perl/embed.h        2008-12-01 01:46:15.000000000 -0800
@@ -806,12 +806,8 @@
 #define save_sptr              Perl_save_sptr
 #define save_svref             Perl_save_svref
 #define save_pushptr           Perl_save_pushptr
-#if defined(PERL_IN_SCOPE_C)
-#ifdef PERL_CORE
-#define save_pushi32ptr                S_save_pushi32ptr
-#endif
-#endif
 #ifdef PERL_CORE
+#define save_pushi32ptr                Perl_save_pushi32ptr
 #define save_pushptrptr                Perl_save_pushptrptr
 #define sawparens              Perl_sawparens
 #define scalar                 Perl_scalar
@@ -3156,12 +3152,8 @@
 #define save_sptr(a)           Perl_save_sptr(aTHX_ a)
 #define save_svref(a)          Perl_save_svref(aTHX_ a)
 #define save_pushptr(a,b)      Perl_save_pushptr(aTHX_ a,b)
-#if defined(PERL_IN_SCOPE_C)
-#ifdef PERL_CORE
-#define save_pushi32ptr(a,b,c) S_save_pushi32ptr(aTHX_ a,b,c)
-#endif
-#endif
 #ifdef PERL_CORE
+#define save_pushi32ptr(a,b,c) Perl_save_pushi32ptr(aTHX_ a,b,c)
 #define save_pushptrptr(a,b,c) Perl_save_pushptrptr(aTHX_ a,b,c)
 #define sawparens(a)           Perl_sawparens(aTHX_ a)
 #define scalar(a)              Perl_scalar(aTHX_ a)

==== //depot/perl/proto.h#991 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#990~34960~     2008-11-30 16:02:17.000000000 -0800
+++ perl/proto.h        2008-12-01 01:46:15.000000000 -0800
@@ -2913,9 +2913,7 @@
        assert(sptr)
 
 PERL_CALLCONV void     Perl_save_pushptr(pTHX_ void *const ptr, const int 
type);
-#if defined(PERL_IN_SCOPE_C)
-STATIC void    S_save_pushi32ptr(pTHX_ I32 i, void *const ptr, const int type);
-#endif
+PERL_CALLCONV void     Perl_save_pushi32ptr(pTHX_ I32 i, void *const ptr, 
const int type);
 PERL_CALLCONV void     Perl_save_pushptrptr(pTHX_ void *const ptr1, void 
*const ptr2, const int type);
 PERL_CALLCONV OP*      Perl_sawparens(pTHX_ OP* o);
 PERL_CALLCONV OP*      Perl_scalar(pTHX_ OP* o);

==== //depot/perl/scope.c#241 (text) ====
Index: perl/scope.c
--- perl/scope.c#240~34960~     2008-11-30 16:02:17.000000000 -0800
+++ perl/scope.c        2008-12-01 01:46:15.000000000 -0800
@@ -360,8 +360,8 @@
     SSPUSHINT(SAVEt_BOOL);
 }
 
-static void
-S_save_pushi32ptr(pTHX_ const I32 i, void *const ptr, const int type)
+void
+Perl_save_pushi32ptr(pTHX_ const I32 i, void *const ptr, const int type)
 {
     dVAR;
     SSCHECK(3);

==== //depot/perl/scope.h#98 (text) ====
Index: perl/scope.h
--- perl/scope.h#97~34960~      2008-11-30 16:02:17.000000000 -0800
+++ perl/scope.h        2008-12-01 01:46:15.000000000 -0800
@@ -183,13 +183,7 @@
        PL_curstackinfo->si_stack = (t);                \
     } STMT_END
 
-#define SAVECOPARYBASE(c) \
-    STMT_START {                                       \
-       SSCHECK(3);                                     \
-       SSPUSHINT(CopARYBASE_get(c));                   \
-       SSPUSHPTR(c);                                   \
-       SSPUSHINT(SAVEt_COP_ARYBASE);                   \
-    } STMT_END
+#define SAVECOPARYBASE(c) save_pushi32ptr(CopARYBASE_get(c), c, 
SAVEt_COP_ARYBASE);
 
 /* Need to do the cop warnings like this, rather than a "SAVEFREESHAREDPV",
    because realloc() means that the value can actually change. Possibly
End of Patch.

Reply via email to