Mercurial > hg > xemacs-beta
comparison src/objects.c @ 3017:1e7cc382eb16
[xemacs-hg @ 2005-10-24 10:07:26 by ben]
refactor mc-alloc dependencies
next-error.el, occur.el: Fix some byte-compile warnings.
alloc.c, buffer.c, buffer.h, casetab.c, casetab.h, charset.h, chartab.c, chartab.h, console-impl.h, console-msw-impl.h, console.c, data.c, database.c, device-impl.h, device-msw.c, device.c, dialog-msw.c, elhash.c, events.h, extents-impl.h, extents.c, faces.c, faces.h, file-coding.c, file-coding.h, frame-impl.h, frame.c, glyphs.c, glyphs.h, gui.c, gui.h, keymap.c, lisp.h, lrecord.h, lstream.c, lstream.h, mule-charset.c, objects-impl.h, objects.c, opaque.c, opaque.h, print.c, process.c, procimpl.h, rangetab.c, rangetab.h, scrollbar-gtk.c, scrollbar-msw.c, scrollbar-x.c, scrollbar.c, scrollbar.h, specifier.c, specifier.h, symbols.c, symeval.h, toolbar.c, toolbar.h, tooltalk.c, ui-gtk.c, ui-gtk.h, unicode.c, window-impl.h, window.c:
Eliminate the majority of #ifdef MC_ALLOC occurrences through
macros LCRECORD_HEADER, ALLOC_LCRECORD_TYPE, MALLOCED_STORAGE_SIZE,
etc. (defined in lrecord.h).
author | ben |
---|---|
date | Mon, 24 Oct 2005 10:07:42 +0000 |
parents | 6fa9919a9a0b |
children | 141c2920ea48 3742ea8250b5 |
comparison
equal
deleted
inserted
replaced
3016:f252275fb013 | 3017:1e7cc382eb16 |
---|---|
176 int retval; | 176 int retval; |
177 | 177 |
178 CHECK_STRING (name); | 178 CHECK_STRING (name); |
179 device = wrap_device (decode_device (device)); | 179 device = wrap_device (decode_device (device)); |
180 | 180 |
181 #ifdef MC_ALLOC | 181 c = ALLOC_LCRECORD_TYPE (Lisp_Color_Instance, &lrecord_color_instance); |
182 c = alloc_lrecord_type (Lisp_Color_Instance, &lrecord_color_instance); | |
183 #else /* not MC_ALLOC */ | |
184 c = alloc_lcrecord_type (Lisp_Color_Instance, &lrecord_color_instance); | |
185 #endif /* not MC_ALLOC */ | |
186 c->name = name; | 182 c->name = name; |
187 c->device = device; | 183 c->device = device; |
188 c->data = 0; | 184 c->data = 0; |
189 c->color_instance_type = get_console_variant (XDEVICE_TYPE (c->device)); | 185 c->color_instance_type = get_console_variant (XDEVICE_TYPE (c->device)); |
190 | 186 |
389 else if (!STRINGP (name)) | 385 else if (!STRINGP (name)) |
390 return Qnil; | 386 return Qnil; |
391 | 387 |
392 device = wrap_device (decode_device (device)); | 388 device = wrap_device (decode_device (device)); |
393 | 389 |
394 #ifdef MC_ALLOC | 390 f = ALLOC_LCRECORD_TYPE (Lisp_Font_Instance, &lrecord_font_instance); |
395 f = alloc_lrecord_type (Lisp_Font_Instance, &lrecord_font_instance); | |
396 #else /* not MC_ALLOC */ | |
397 f = alloc_lcrecord_type (Lisp_Font_Instance, &lrecord_font_instance); | |
398 #endif /* not MC_ALLOC */ | |
399 f->name = name; | 391 f->name = name; |
400 f->truename = Qnil; | 392 f->truename = Qnil; |
401 f->device = device; | 393 f->device = device; |
402 | 394 |
403 f->data = 0; | 395 f->data = 0; |
1204 reinit_vars_of_objects (void) | 1196 reinit_vars_of_objects (void) |
1205 { | 1197 { |
1206 staticpro_nodump (&Vthe_null_color_instance); | 1198 staticpro_nodump (&Vthe_null_color_instance); |
1207 { | 1199 { |
1208 Lisp_Color_Instance *c = | 1200 Lisp_Color_Instance *c = |
1209 #ifdef MC_ALLOC | 1201 ALLOC_LCRECORD_TYPE (Lisp_Color_Instance, &lrecord_color_instance); |
1210 alloc_lrecord_type (Lisp_Color_Instance, &lrecord_color_instance); | |
1211 #else /* not MC_ALLOC */ | |
1212 alloc_lcrecord_type (Lisp_Color_Instance, &lrecord_color_instance); | |
1213 #endif /* not MC_ALLOC */ | |
1214 c->name = Qnil; | 1202 c->name = Qnil; |
1215 c->device = Qnil; | 1203 c->device = Qnil; |
1216 c->data = 0; | 1204 c->data = 0; |
1217 | 1205 |
1218 Vthe_null_color_instance = wrap_color_instance (c); | 1206 Vthe_null_color_instance = wrap_color_instance (c); |
1219 } | 1207 } |
1220 | 1208 |
1221 staticpro_nodump (&Vthe_null_font_instance); | 1209 staticpro_nodump (&Vthe_null_font_instance); |
1222 { | 1210 { |
1223 Lisp_Font_Instance *f = | 1211 Lisp_Font_Instance *f = |
1224 #ifdef MC_ALLOC | 1212 ALLOC_LCRECORD_TYPE (Lisp_Font_Instance, &lrecord_font_instance); |
1225 alloc_lrecord_type (Lisp_Font_Instance, &lrecord_font_instance); | |
1226 #else /* not MC_ALLOC */ | |
1227 alloc_lcrecord_type (Lisp_Font_Instance, &lrecord_font_instance); | |
1228 #endif /* not MC_ALLOC */ | |
1229 f->name = Qnil; | 1213 f->name = Qnil; |
1230 f->truename = Qnil; | 1214 f->truename = Qnil; |
1231 f->device = Qnil; | 1215 f->device = Qnil; |
1232 f->data = 0; | 1216 f->data = 0; |
1233 | 1217 |