comparison src/buffer.c @ 5120:d1247f3cc363 ben-lisp-object

latest work on lisp-object workspace; more changes eliminating LCRECORD in place of LISP_OBJECT; now compiles and runs.
author Ben Wing <ben@xemacs.org>
date Mon, 28 Dec 2009 01:15:52 -0600
parents e0db3c197671
children 623d57b7fbe8
comparison
equal deleted inserted replaced
5119:d877c14318b3 5120:d1247f3cc363
599 allocate_buffer (void) 599 allocate_buffer (void)
600 { 600 {
601 Lisp_Object obj = ALLOC_LISP_OBJECT (buffer); 601 Lisp_Object obj = ALLOC_LISP_OBJECT (buffer);
602 struct buffer *b = XBUFFER (obj); 602 struct buffer *b = XBUFFER (obj);
603 603
604 COPY_LCRECORD (b, XBUFFER (Vbuffer_defaults)); 604 COPY_LISP_OBJECT (b, XBUFFER (Vbuffer_defaults));
605 605
606 return b; 606 return b;
607 } 607 }
608 608
609 static Lisp_Object 609 static Lisp_Object
1773 static void 1773 static void
1774 compute_buffer_usage (struct buffer *b, struct buffer_stats *stats, 1774 compute_buffer_usage (struct buffer *b, struct buffer_stats *stats,
1775 struct overhead_stats *ovstats) 1775 struct overhead_stats *ovstats)
1776 { 1776 {
1777 xzero (*stats); 1777 xzero (*stats);
1778 stats->other += LISPOBJ_STORAGE_SIZE (b, sizeof (*b), ovstats); 1778 stats->other += LISP_OBJECT_STORAGE_SIZE (b, sizeof (*b), ovstats);
1779 stats->text += compute_buffer_text_usage (b, ovstats); 1779 stats->text += compute_buffer_text_usage (b, ovstats);
1780 stats->markers += compute_buffer_marker_usage (b, ovstats); 1780 stats->markers += compute_buffer_marker_usage (b, ovstats);
1781 stats->extents += compute_buffer_extent_usage (b, ovstats); 1781 stats->extents += compute_buffer_extent_usage (b, ovstats);
1782 } 1782 }
1783 1783
2137 #ifdef NEW_GC 2137 #ifdef NEW_GC
2138 #define DEFVAR_BUFFER_LOCAL_1(lname, field_name, forward_type, magic_fun) \ 2138 #define DEFVAR_BUFFER_LOCAL_1(lname, field_name, forward_type, magic_fun) \
2139 do \ 2139 do \
2140 { \ 2140 { \
2141 struct symbol_value_forward *I_hate_C = \ 2141 struct symbol_value_forward *I_hate_C = \
2142 alloc_lrecord_type (struct symbol_value_forward, \ 2142 XSYMBOL_VALUE_FORWARD (ALLOC_LISP_OBJECT (symbol_value_forward)); \
2143 &lrecord_symbol_value_forward); \
2144 /*mcpro ((Lisp_Object) I_hate_C);*/ \ 2143 /*mcpro ((Lisp_Object) I_hate_C);*/ \
2145 \ 2144 \
2146 I_hate_C->magic.value = &(buffer_local_flags.field_name); \ 2145 I_hate_C->magic.value = &(buffer_local_flags.field_name); \
2147 I_hate_C->magic.type = forward_type; \ 2146 I_hate_C->magic.type = forward_type; \
2148 I_hate_C->magicfun = magic_fun; \ 2147 I_hate_C->magicfun = magic_fun; \
2213 DEFVAR_BUFFER_DEFAULTS_MAGIC (lname, field_name, 0) 2212 DEFVAR_BUFFER_DEFAULTS_MAGIC (lname, field_name, 0)
2214 2213
2215 static void 2214 static void
2216 nuke_all_buffer_slots (struct buffer *b, Lisp_Object zap) 2215 nuke_all_buffer_slots (struct buffer *b, Lisp_Object zap)
2217 { 2216 {
2218 ZERO_LCRECORD (b); 2217 ZERO_LISP_OBJECT (b);
2219 2218
2220 b->extent_info = Qnil; 2219 b->extent_info = Qnil;
2221 b->indirect_children = Qnil; 2220 b->indirect_children = Qnil;
2222 b->own_text.line_number_cache = Qnil; 2221 b->own_text.line_number_cache = Qnil;
2223 2222