summaryrefslogtreecommitdiff
path: root/scope.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-11-30 22:46:37 +0000
committerNicholas Clark <nick@ccl4.org>2008-11-30 22:46:37 +0000
commit2fd8beea017eccf05d12bfa6e4db7c5340ce637b (patch)
tree49346b27333d4b5a7519f212fe63cced96e2933a /scope.h
parentc6ae76470e6575530141df6c32cf71111bc2e391 (diff)
downloadperl-2fd8beea017eccf05d12bfa6e4db7c5340ce637b.tar.gz
Convert all the scope save functions of the form
SSCHECK(2); SSPUSHPTR(o); SSPUSHINT(SAVEt_FREEOP); into a single function Perl_save_pushptr(ptr, type), which the others call. Implement the others as macros. This reduces the object code size. p4raw-id: //depot/perl@34956
Diffstat (limited to 'scope.h')
-rw-r--r--scope.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/scope.h b/scope.h
index c1fa4f9656..e910388c8b 100644
--- a/scope.h
+++ b/scope.h
@@ -260,6 +260,12 @@ Closing bracket on a callback. See C<ENTER> and L<perlcall>.
#define SSPTR(off,type) ((type) ((char*)PL_savestack + off))
#define SSPTRt(off,type) ((type*) ((char*)PL_savestack + off))
+#define save_freesv(op) save_pushptr((void *)(op), SAVEt_FREESV)
+#define save_mortalizesv(op) save_pushptr((void *)(op), SAVEt_MORTALIZESV)
+#define save_freeop(op) save_pushptr((void *)(op), SAVEt_FREEOP)
+#define save_freepv(pv) save_pushptr((void *)(pv), SAVEt_FREEPV)
+#define save_op() save_pushptr((void *)(PL_op), SAVEt_OP)
+
/*
* Local variables:
* c-indentation-style: bsd