[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/lisp.h [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/lisp.h [lexbind] |
Date: |
Thu, 28 Oct 2004 22:27:47 -0400 |
Index: emacs/src/lisp.h
diff -c emacs/src/lisp.h:1.423.2.22 emacs/src/lisp.h:1.423.2.23
*** emacs/src/lisp.h:1.423.2.22 Mon Oct 25 04:22:26 2004
--- emacs/src/lisp.h Fri Oct 29 02:05:09 2004
***************
*** 3293,3299 ****
extern Lisp_Object safe_alloca_unwind (Lisp_Object);
#define USE_SAFE_ALLOCA \
! int sa_count = SPECPDL_INDEX ()
/* SAFE_ALLOCA allocates a simple buffer. */
--- 3293,3299 ----
extern Lisp_Object safe_alloca_unwind (Lisp_Object);
#define USE_SAFE_ALLOCA \
! int sa_count = SPECPDL_INDEX (), sa_must_free = 0
/* SAFE_ALLOCA allocates a simple buffer. */
***************
*** 3304,3309 ****
--- 3304,3310 ----
else \
{ \
buf = (type) xmalloc (size); \
+ sa_must_free++; \
record_unwind_protect (safe_alloca_unwind, \
make_save_value (buf, 0)); \
} \
***************
*** 3311,3320 ****
/* SAFE_FREE frees xmalloced memory and enables GC as needed. */
! #define SAFE_FREE(size) \
do { \
! if ((size) >= MAX_ALLOCA) \
unbind_to (sa_count, Qnil); \
} while (0)
--- 3312,3323 ----
/* SAFE_FREE frees xmalloced memory and enables GC as needed. */
! #define SAFE_FREE() \
do { \
! if (sa_must_free) { \
! sa_must_free = 0; \
unbind_to (sa_count, Qnil); \
+ } \
} while (0)
***************
*** 3331,3347 ****
buf = (Lisp_Object *) xmalloc (size_); \
arg_ = make_save_value (buf, nelt); \
XSAVE_VALUE (arg_)->dogc = 1; \
record_unwind_protect (safe_alloca_unwind, arg_); \
} \
} while (0)
- #define SAFE_FREE_LISP(nelt) \
- do { \
- if (((nelt) * sizeof (Lisp_Object)) >= MAX_ALLOCA) \
- unbind_to (sa_count, Qnil); \
- } while (0)
-
-
#endif /* EMACS_LISP_H */
--- 3334,3344 ----
buf = (Lisp_Object *) xmalloc (size_); \
arg_ = make_save_value (buf, nelt); \
XSAVE_VALUE (arg_)->dogc = 1; \
+ sa_must_free++; \
record_unwind_protect (safe_alloca_unwind, arg_); \
} \
} while (0)
#endif /* EMACS_LISP_H */