This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Provide share_hek_hek, and use it for fast copying of shared string
[perl5.git] / pp.h
diff --git a/pp.h b/pp.h
index 7bce54f..8f127d1 100644 (file)
--- a/pp.h
+++ b/pp.h
@@ -68,8 +68,7 @@ Refetch the stack pointer.  Used after a callback.  See L<perlcall>.
 #define dSP            register SV **sp = PL_stack_sp
 #define djSP           dSP
 #define dMARK          register SV **mark = PL_stack_base + POPMARK
-#define dORIGMARK      I32 origmark = mark - PL_stack_base
-#define SETORIGMARK    origmark = mark - PL_stack_base
+#define dORIGMARK      const I32 origmark = mark - PL_stack_base
 #define ORIGMARK       (PL_stack_base + origmark)
 
 #define SPAGAIN                sp = PL_stack_sp
@@ -99,16 +98,13 @@ See C<PUSHMARK> and L<perlcall> for other uses.
 Pops an SV off the stack.
 
 =for apidoc Amn|char*|POPp
-Pops a string off the stack. Deprecated. New code should provide
-a STRLEN n_a and use POPpx.
+Pops a string off the stack. Deprecated. New code should use POPpx.
 
 =for apidoc Amn|char*|POPpx
 Pops a string off the stack.
-Requires a variable STRLEN n_a in scope.
 
 =for apidoc Amn|char*|POPpbytex
 Pops a string off the stack which must consist of bytes i.e. characters < 256.
-Requires a variable STRLEN n_a in scope.
 
 =for apidoc Amn|NV|POPn
 Pops a double off the stack.
@@ -129,8 +125,9 @@ Pops a long off the stack.
 
 #define POPs           (*sp--)
 #define POPp           (SvPVx(POPs, PL_na))            /* deprecated */
-#define POPpx          (SvPVx(POPs, n_a))
-#define POPpbytex      (SvPVbytex(POPs, n_a))
+#define POPpx          (SvPVx_nolen(POPs))
+#define POPpconstx     (SvPVx_nolen_const(POPs))
+#define POPpbytex      (SvPVbytex_nolen(POPs))
 #define POPn           (SvNVx(POPs))
 #define POPi           ((IV)SvIVx(POPs))
 #define POPu           ((UV)SvUVx(POPs))
@@ -145,7 +142,7 @@ Pops a long off the stack.
 #define TOPm1s         (*(sp-1))
 #define TOPp1s         (*(sp+1))
 #define TOPp           (SvPV(TOPs, PL_na))             /* deprecated */
-#define TOPpx          (SvPV(TOPs, n_a))
+#define TOPpx          (SvPV_nolen(TOPs))
 #define TOPn           (SvNV(TOPs))
 #define TOPi           ((IV)SvIV(TOPs))
 #define TOPu           ((UV)SvUV(TOPs))
@@ -476,7 +473,7 @@ and C<PUSHu>.
    changed SV* ref to SV* tmpRef */
 #define RvDEEPCP(rv) STMT_START { SV* tmpRef=SvRV(rv);      \
   if (SvREFCNT(tmpRef)>1) {                 \
-    SvRV(rv)=AMG_CALLun(rv,copy);      \
+    SvRV_set(rv, AMG_CALLun(rv,copy)); \
     SvREFCNT_dec(tmpRef);                   \
   } } STMT_END