diff options
| author | Dmitry Antipov | 2012-07-31 16:36:19 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-07-31 16:36:19 +0400 |
| commit | e34f7f79833a23586d32fe522b547a0d9a696c13 (patch) | |
| tree | 4a2d3927202cb91b474bc9648ca9dee2bffaa54a /src/alloc.c | |
| parent | c09bfb2f140b2885af17185634451e2abfd6e91c (diff) | |
| download | emacs-e34f7f79833a23586d32fe522b547a0d9a696c13.tar.gz emacs-e34f7f79833a23586d32fe522b547a0d9a696c13.zip | |
Generalize INTERNAL_FIELD between buffers, keyboards and frames.
* src/lisp.h (INTERNAL_FIELD): New macro.
* src/buffer.h (BUFFER_INTERNAL_FIELD): Removed.
(BVAR): Change to use INTERNAL_FIELD.
* src/keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
(KVAR): Change to use INTERNAL_FIELD.
* src/frame.h (FVAR): New macro.
(struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
* src/alloc.c, src/buffer.c, src/data.c, src/dispnew.c, src/dosfns.c
* src/eval.c, src/frame.c, src/fringe.c, src/gtkutil.c, src/minibuf.c
* src/nsfns.m, src/nsterm.m, src/print.c, src/term.c, src/w32fns.c
* src/w32menu.c, src/w32term.c, src/window.c, src/window.h, src/xdisp.c
* src/xfaces.c, src/xfns.c, src/xmenu.c, src/xterm.c: Users changed.
* admin/coccinelle/frame.cocci: Semantic patch to replace direct
access to Lisp_Object members of struct frame to FVAR.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c index 5b2553c69cc..f04f3c05134 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4424,7 +4424,7 @@ live_buffer_p (struct mem_node *m, void *p) | |||
| 4424 | must not have been killed. */ | 4424 | must not have been killed. */ |
| 4425 | return (m->type == MEM_TYPE_BUFFER | 4425 | return (m->type == MEM_TYPE_BUFFER |
| 4426 | && p == m->start | 4426 | && p == m->start |
| 4427 | && !NILP (((struct buffer *) p)->BUFFER_INTERNAL_FIELD (name))); | 4427 | && !NILP (((struct buffer *) p)->INTERNAL_FIELD (name))); |
| 4428 | } | 4428 | } |
| 4429 | 4429 | ||
| 4430 | #endif /* GC_MARK_STACK || defined GC_MALLOC_CHECK */ | 4430 | #endif /* GC_MARK_STACK || defined GC_MALLOC_CHECK */ |
| @@ -5549,10 +5549,10 @@ See Info node `(elisp)Garbage Collection'. */) | |||
| 5549 | turned off in that buffer. Calling truncate_undo_list on | 5549 | turned off in that buffer. Calling truncate_undo_list on |
| 5550 | Qt tends to return NULL, which effectively turns undo back on. | 5550 | Qt tends to return NULL, which effectively turns undo back on. |
| 5551 | So don't call truncate_undo_list if undo_list is Qt. */ | 5551 | So don't call truncate_undo_list if undo_list is Qt. */ |
| 5552 | if (! EQ (nextb->BUFFER_INTERNAL_FIELD (undo_list), Qt)) | 5552 | if (! EQ (nextb->INTERNAL_FIELD (undo_list), Qt)) |
| 5553 | { | 5553 | { |
| 5554 | Lisp_Object tail, prev; | 5554 | Lisp_Object tail, prev; |
| 5555 | tail = nextb->BUFFER_INTERNAL_FIELD (undo_list); | 5555 | tail = nextb->INTERNAL_FIELD (undo_list); |
| 5556 | prev = Qnil; | 5556 | prev = Qnil; |
| 5557 | while (CONSP (tail)) | 5557 | while (CONSP (tail)) |
| 5558 | { | 5558 | { |
| @@ -5561,7 +5561,7 @@ See Info node `(elisp)Garbage Collection'. */) | |||
| 5561 | && !XMARKER (XCAR (XCAR (tail)))->gcmarkbit) | 5561 | && !XMARKER (XCAR (XCAR (tail)))->gcmarkbit) |
| 5562 | { | 5562 | { |
| 5563 | if (NILP (prev)) | 5563 | if (NILP (prev)) |
| 5564 | nextb->BUFFER_INTERNAL_FIELD (undo_list) = tail = XCDR (tail); | 5564 | nextb->INTERNAL_FIELD (undo_list) = tail = XCDR (tail); |
| 5565 | else | 5565 | else |
| 5566 | { | 5566 | { |
| 5567 | tail = XCDR (tail); | 5567 | tail = XCDR (tail); |
| @@ -5577,7 +5577,7 @@ See Info node `(elisp)Garbage Collection'. */) | |||
| 5577 | } | 5577 | } |
| 5578 | /* Now that we have stripped the elements that need not be in the | 5578 | /* Now that we have stripped the elements that need not be in the |
| 5579 | undo_list any more, we can finally mark the list. */ | 5579 | undo_list any more, we can finally mark the list. */ |
| 5580 | mark_object (nextb->BUFFER_INTERNAL_FIELD (undo_list)); | 5580 | mark_object (nextb->INTERNAL_FIELD (undo_list)); |
| 5581 | } | 5581 | } |
| 5582 | 5582 | ||
| 5583 | gc_sweep (); | 5583 | gc_sweep (); |