various fixes for clean build and test on win32; configpm broken,
[p5sagit/p5-mst-13.2.git] / scope.c
diff --git a/scope.c b/scope.c
index 4d62ae8..ad7fe29 100644 (file)
--- a/scope.c
+++ b/scope.c
 #include "EXTERN.h"
 #include "perl.h"
 
+void *
+default_protect(int *excpt, protect_body_t body, ...)
+{
+    dTHR;
+    dJMPENV;
+    va_list args;
+    int ex;
+    void *ret;
+
+    DEBUG_l(deb("Setting up local jumplevel %p, was %p\n",
+               &cur_env, PL_top_env));
+    JMPENV_PUSH(ex);
+    if (ex)
+       ret = NULL;
+    else {
+       va_start(args, body);
+       ret = CALL_FPTR(body)(args);
+       va_end(args);
+    }
+    *excpt = ex;
+    JMPENV_POP;
+    return ret;
+}
+
 SV**
 stack_grow(SV **sp, SV **p, int n)
 {
@@ -135,6 +159,19 @@ savestack_grow(void)
 #undef GROW
 
 void
+tmps_grow(I32 n)
+{
+    dTHR;
+#ifndef STRESS_REALLOC
+    if (n < 128)
+       n = (PL_tmps_max < 512) ? 128 : 512;
+#endif
+    PL_tmps_max = PL_tmps_ix + n + 1;
+    Renew(PL_tmps_stack, PL_tmps_max, SV*);
+}
+
+
+void
 free_tmps(void)
 {
     dTHR;