Once again syncing after too long an absence
[p5sagit/p5-mst-13.2.git] / pp.h
diff --git a/pp.h b/pp.h
index 029583a..2905e17 100644 (file)
--- a/pp.h
+++ b/pp.h
@@ -1,6 +1,6 @@
 /*    pp.h
  *
- *    Copyright (c) 1991-2000, Larry Wall
+ *    Copyright (c) 1991-2001, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -33,6 +33,13 @@ L<perlcall>.
 Declares a local copy of perl's stack pointer for the XSUB, available via
 the C<SP> macro.  See C<SP>.
 
+=for apidoc ms||djSP
+
+Declare Just C<SP>. This is actually identical to C<dSP>, and declares
+a local copy of perl's stack pointer, available via the C<SP> macro.
+See C<SP>.  (Available for backward source code compatibility with the
+old (Perl 5.005) thread model.)
+
 =for apidoc Ams||dMARK
 Declare a stack marker variable, C<mark>, for the XSUB.  See C<MARK> and
 C<dORIGMARK>.
@@ -46,8 +53,7 @@ The original stack mark for the XSUB.  See C<dORIGMARK>.
 =for apidoc Ams||SPAGAIN
 Refetch the stack pointer.  Used after a callback.  See L<perlcall>.
 
-=cut
-*/
+=cut */
 
 #define SP sp
 #define MARK mark
@@ -61,7 +67,7 @@ Refetch the stack pointer.  Used after a callback.  See L<perlcall>.
 #define POPMARK                (*PL_markstack_ptr--)
 
 #define djSP           register SV **sp = PL_stack_sp
-#define dSP            dTHR; djSP
+#define dSP            djSP
 #define dMARK          register SV **mark = PL_stack_base + POPMARK
 #define dORIGMARK      I32 origmark = mark - PL_stack_base
 #define SETORIGMARK    origmark = mark - PL_stack_base
@@ -126,6 +132,7 @@ Pops a long off the stack.
 #endif
 
 #define TOPs           (*sp)
+#define TOPm1s         (*(sp-1))
 #define TOPp           (SvPV(TOPs, PL_na))             /* deprecated */
 #define TOPpx          (SvPV(TOPs, n_a))
 #define TOPn           (SvNV(TOPs))