comparison src/rangetab.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 861a7995b9fe
children cbf129b005df 3742ea8250b5
comparison
equal deleted inserted replaced
3016:f252275fb013 3017:1e7cc382eb16
326 there would be eight days. Similarly, there are 15 (= 20 - 5) elements in 326 there would be eight days. Similarly, there are 15 (= 20 - 5) elements in
327 the range [5, 20), but 16 in the range [5, 20]. 327 the range [5, 20), but 16 in the range [5, 20].
328 */ 328 */
329 (type)) 329 (type))
330 { 330 {
331 #ifdef MC_ALLOC 331 Lisp_Range_Table *rt = ALLOC_LCRECORD_TYPE (Lisp_Range_Table,
332 Lisp_Range_Table *rt = alloc_lrecord_type (Lisp_Range_Table,
333 &lrecord_range_table);
334 #else /* not MC_ALLOC */
335 Lisp_Range_Table *rt = alloc_lcrecord_type (Lisp_Range_Table,
336 &lrecord_range_table); 332 &lrecord_range_table);
337 #endif /* not MC_ALLOC */
338 rt->entries = Dynarr_new (range_table_entry); 333 rt->entries = Dynarr_new (range_table_entry);
339 rt->type = range_table_symbol_to_type (type); 334 rt->type = range_table_symbol_to_type (type);
340 return wrap_range_table (rt); 335 return wrap_range_table (rt);
341 } 336 }
342 337
350 Lisp_Range_Table *rt, *rtnew; 345 Lisp_Range_Table *rt, *rtnew;
351 346
352 CHECK_RANGE_TABLE (range_table); 347 CHECK_RANGE_TABLE (range_table);
353 rt = XRANGE_TABLE (range_table); 348 rt = XRANGE_TABLE (range_table);
354 349
355 #ifdef MC_ALLOC 350 rtnew = ALLOC_LCRECORD_TYPE (Lisp_Range_Table, &lrecord_range_table);
356 rtnew = alloc_lrecord_type (Lisp_Range_Table, &lrecord_range_table);
357 #else /* not MC_ALLOC */
358 rtnew = alloc_lcrecord_type (Lisp_Range_Table, &lrecord_range_table);
359 #endif /* not MC_ALLOC */
360 rtnew->entries = Dynarr_new (range_table_entry); 351 rtnew->entries = Dynarr_new (range_table_entry);
361 rtnew->type = rt->type; 352 rtnew->type = rt->type;
362 353
363 Dynarr_add_many (rtnew->entries, Dynarr_atp (rt->entries, 0), 354 Dynarr_add_many (rtnew->entries, Dynarr_atp (rt->entries, 0),
364 Dynarr_length (rt->entries)); 355 Dynarr_length (rt->entries));