/[emacs]/emacs/src/lisp.h
ViewVC logotype

Diff of /emacs/src/lisp.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.497 by kfstorm, Mon Jun 21 21:51:18 2004 UTC revision 1.498 by kfstorm, Mon Jun 21 22:35:29 2004 UTC
# Line 3256  extern Lisp_Object safe_alloca_unwind (L Line 3256  extern Lisp_Object safe_alloca_unwind (L
3256  #define USE_SAFE_ALLOCA                 \  #define USE_SAFE_ALLOCA                 \
3257    int sa_count = SPECPDL_INDEX ()    int sa_count = SPECPDL_INDEX ()
3258    
3259    /* SAFE_ALLOCA allocates a simple buffer.  */
3260    
3261  #define SAFE_ALLOCA(buf, type, size)                      \  #define SAFE_ALLOCA(buf, type, size)                      \
3262    do {                                                    \    do {                                                    \
3263      if ((size) < MAX_ALLOCA)                              \      if ((size) < MAX_ALLOCA)                              \
# Line 3268  extern Lisp_Object safe_alloca_unwind (L Line 3270  extern Lisp_Object safe_alloca_unwind (L
3270        }                                                   \        }                                                   \
3271    } while (0)    } while (0)
3272    
3273    /* SAFE_ALLOCA_LISP allocates an array of Lisp_Objects.
3274       Temporarily inhibits GC since that array is unknow to GC.  */
3275    
3276    #define SAFE_ALLOCA_LISP(buf, size)                       \
3277      do {                                                    \
3278        if ((size) < MAX_ALLOCA)                              \
3279          buf = (Lisp_Object *) alloca (size);                \
3280        else                                                  \
3281          {                                                   \
3282            buf = (Lisp_Object *) xmalloc (size);             \
3283            inhibit_garbage_collection();                     \
3284            record_unwind_protect (safe_alloca_unwind,        \
3285                                   make_save_value (buf, 0)); \
3286          }                                                   \
3287      } while (0)
3288    
3289    /* SAFE_FREE frees xmalloced memory and enables GC as needed.  */
3290    
3291  #define SAFE_FREE(size)                 \  #define SAFE_FREE(size)                 \
3292    do {                                  \    do {                                  \
3293      if ((size) >= MAX_ALLOCA)           \      if ((size) >= MAX_ALLOCA)           \

Legend:
Removed from v.1.497  
changed lines
  Added in v.1.498

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26