Commit 81435be8 authored by Radford Neal's avatar Radford Neal

define UNPROTECT_PROTECT

parent 75faa4c3
......@@ -1899,6 +1899,8 @@ static inline SEXP SKIP_USING_SYMBITS (SEXP rho, SEXP symbol)
defined. There arguments should be simple variables - avoid calling
anything, and avoid any side effects.
UNPROTECT_PROTECT(x) is the same as UNPROTECT(1); PROTECT(x), but faster.
Defining USE_FAST_PROTECT_MACROS in source files outside src/main may
cause problems at link time.
......@@ -1946,6 +1948,9 @@ extern R_NORETURN void Rf_unprotect_error (void);
#define UNPROTECT(n) ((void) (R_PPStackTop -= (n)))
#endif
#undef UNPROTECT_PROTECT
#define UNPROTECT_PROTECT(s) (R_PPStack[R_PPStackTop] = (s))
#undef PROTECT_WITH_INDEX
#define PROTECT_WITH_INDEX(x,i) \
( (*(i) = R_PPStackTop), PROTECT(x) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment