diff options
author | Karoly Lorentey <[email protected]> | 2004-10-31 02:05:24 +0000 |
---|---|---|
committer | Karoly Lorentey <[email protected]> | 2004-10-31 02:05:24 +0000 |
commit | e0bc17abe6979d607e8de4684dddb96e53c60065 (patch) | |
tree | b7cb7bc5df9f12138937fd958cdf4b9c2d19ee3a /src/lisp.h | |
parent | f158167a84475d5fc41931531406821e6413afd7 (diff) | |
parent | 707994d2626cf0f01c3ece4028d73835068d64dc (diff) |
Merged in changes from CVS trunk.
Patches applied:
* [email protected]/emacs--cvs-trunk--0--patch-639
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-640
Merge from gnus--rel--5.10
* [email protected]/emacs--cvs-trunk--0--patch-641
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-642
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-643
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-644
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-645
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-646
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-647
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-648
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-649
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-650
Merge from gnus--rel--5.10
* [email protected]/emacs--cvs-trunk--0--patch-651
Update from CVS
* [email protected]/emacs--cvs-trunk--0--patch-652
Update from CVS
* [email protected]/gnus--rel--5.10--patch-59
Update from CVS
* [email protected]/gnus--rel--5.10--patch-60
Update from CVS
* [email protected]/gnus--rel--5.10--patch-61
Update from CVS
* [email protected]/gnus--rel--5.10--patch-62
Update from CVS
* [email protected]/gnus--rel--5.10--patch-63
Update from CVS
git-archimport-id: [email protected]/emacs--multi-tty--0--patch-263
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/lisp.h b/src/lisp.h index ce0fdf96e4..55664cb8ca 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3265,7 +3265,7 @@ extern Lisp_Object Vdirectory_sep_char; extern Lisp_Object safe_alloca_unwind (Lisp_Object); #define USE_SAFE_ALLOCA \ - int sa_count = SPECPDL_INDEX () + int sa_count = SPECPDL_INDEX (), sa_must_free = 0 /* SAFE_ALLOCA allocates a simple buffer. */ @@ -3276,6 +3276,7 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object); else \ { \ buf = (type) xmalloc (size); \ + sa_must_free++; \ record_unwind_protect (safe_alloca_unwind, \ make_save_value (buf, 0)); \ } \ @@ -3283,10 +3284,12 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object); /* SAFE_FREE frees xmalloced memory and enables GC as needed. */ -#define SAFE_FREE(size) \ +#define SAFE_FREE() \ do { \ - if ((size) >= MAX_ALLOCA) \ + if (sa_must_free) { \ + sa_must_free = 0; \ unbind_to (sa_count, Qnil); \ + } \ } while (0) @@ -3303,17 +3306,11 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object); 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) -#define SAFE_FREE_LISP(nelt) \ - do { \ - if (((nelt) * sizeof (Lisp_Object)) >= MAX_ALLOCA) \ - unbind_to (sa_count, Qnil); \ - } while (0) - - #endif /* EMACS_LISP_H */ |