Branch: Tag:

2000-12-04

2000-12-04 19:39:46 by Martin Stjernholm <mast@lysator.liu.se>

Added custom_check_stack. Moved some constant strings from a couple of
macros to global variables to avoid duplicates in the binary.

Rev: src/interpret.c:1.177
Rev: src/interpret.h:1.70

5:   \*/   /**/   #include "global.h" - RCSID("$Id: interpret.c,v 1.176 2000/12/01 08:09:48 hubbe Exp $"); + RCSID("$Id: interpret.c,v 1.177 2000/12/04 19:39:45 mast Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
64:   #define C_STACK_MARGIN 8000 /* Tested in 7.1: 3000 was enough, 2600 wasn't. */       + PMOD_EXPORT const char *Pike_check_stack_errmsg = +  "Svalue stack overflow. " +  "(%ld of %ld entries on stack, needed %ld more entries)\n"; + PMOD_EXPORT const char *Pike_check_mark_stack_errmsg = +  "Mark stack overflow.\n"; + PMOD_EXPORT const char *Pike_check_c_stack_errmsg = +  "C stack overflow.\n"; +  +    #ifdef PIKE_DEBUG   static char trace_buffer[2000];   #endif
1643:   }   #endif    + PMOD_EXPORT void custom_check_stack(size_t amount, const char *fmt, ...) + { +  if (low_stack_check(amount)) { +  va_list args; +  va_start(args, fmt); +  va_error(fmt, args); +  } + } +    PMOD_EXPORT void cleanup_interpret(void)   {   #ifdef PIKE_DEBUG