summaryrefslogtreecommitdiff
path: root/scope.h
diff options
context:
space:
mode:
Diffstat (limited to 'scope.h')
-rw-r--r--scope.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/scope.h b/scope.h
index bbb55628fe..f86039dbd1 100644
--- a/scope.h
+++ b/scope.h
@@ -48,6 +48,7 @@
#define SAVEt_SHARED_PVREF 37
#define SAVEt_BOOL 38
#define SAVEt_SET_SVFLAGS 39
+#define SAVEt_SAVESWITCHSTACK 40
#ifndef SCOPE_SAVES_SIGNAL_MASK
#define SCOPE_SAVES_SIGNAL_MASK 0
@@ -169,6 +170,16 @@ Closing bracket on a callback. See C<ENTER> and L<perlcall>.
SSPUSHINT(SAVEt_COMPPAD); \
} STMT_END
+#define SAVESWITCHSTACK(f,t) \
+ STMT_START { \
+ SSCHECK(3); \
+ SSPUSHPTR((SV*)(f)); \
+ SSPUSHPTR((SV*)(t)); \
+ SSPUSHINT(SAVEt_SAVESWITCHSTACK); \
+ SWITCHSTACK((f),(t)); \
+ PL_curstackinfo->si_stack = (t); \
+ } STMT_END
+
#ifdef USE_ITHREADS
# define SAVECOPSTASH(c) SAVEPPTR(CopSTASHPV(c))
# define SAVECOPSTASH_FREE(c) SAVESHAREDPV(CopSTASHPV(c))