From 02db2b7b4dd14eb0184a5e518cff4cef3723243b Mon Sep 17 00:00:00 2001 From: Ilya Zakharevich Date: Sun, 19 Nov 2000 17:30:26 -0500 Subject: The first step in removing recursion from the REx engine Message-ID: <20001119223026.A5165@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@7760 --- scope.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scope.h') diff --git a/scope.h b/scope.h index e6a4209bd7..3aad0be2ae 100644 --- a/scope.h +++ b/scope.h @@ -173,11 +173,14 @@ Closing bracket on a callback. See C and L. * SSPTR() converts the index returned by SSNEW/SSNEWa() into a pointer. */ -#define SSNEW(size) save_alloc(size, 0) -#define SSNEWa(size,align) save_alloc(size, \ +#define SSNEW(size) save_alloc(aTHX_ (size), 0) +#define SSNEWt(n,t) SSNEW((n)*sizeof(t)) +#define SSNEWa(size,align) save_alloc(aTHX_ (size), \ (align - ((int)((caddr_t)&PL_savestack[PL_savestack_ix]) % align)) % align) +#define SSNEWat(n,t,align) SSNEWa((n)*sizeof(t), align) -#define SSPTR(off,type) ((type) ((char*)PL_savestack + off)) +#define SSPTR(off,type) ((type) ((char*)PL_savestack + off)) +#define SSPTRt(off,type) ((type*) ((char*)PL_savestack + off)) /* A jmpenv packages the state required to perform a proper non-local jump. * Note that there is a start_env initialized when perl starts, and top_env -- cgit v1.2.1