Mercurial > hg > xemacs-beta
diff src/chartab.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 | 4bc213965183 |
children | facf3239ba30 |
line wrap: on
line diff
--- a/src/chartab.c Mon Oct 24 08:12:59 2005 +0000 +++ b/src/chartab.c Mon Oct 24 10:07:42 2005 +0000 @@ -476,11 +476,7 @@ if (!EQ (ct->level1[i], Qnull_pointer) && CHAR_TABLE_ENTRYP (ct->level1[i]) && !OBJECT_DUMPED_P (ct->level1[1])) -#ifdef MC_ALLOC - free_lrecord (ct->level1[i]); -#else /* not MC_ALLOC */ - free_lcrecord (ct->level1[i]); -#endif /* not MC_ALLOC */ + FREE_LCRECORD (ct->level1[i]); ct->level1[i] = value; } #endif /* MULE */ @@ -596,11 +592,7 @@ Lisp_Object obj; enum char_table_type ty = symbol_to_char_table_type (type); -#ifdef MC_ALLOC - ct = alloc_lrecord_type (Lisp_Char_Table, &lrecord_char_table); -#else /* not MC_ALLOC */ - ct = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table); -#endif /* not MC_ALLOC */ + ct = ALLOC_LCRECORD_TYPE (Lisp_Char_Table, &lrecord_char_table); ct->type = ty; obj = wrap_char_table (ct); if (ty == CHAR_TABLE_TYPE_SYNTAX) @@ -633,11 +625,7 @@ { int i; Lisp_Char_Table_Entry *cte = -#ifdef MC_ALLOC - alloc_lrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry); -#else /* not MC_ALLOC */ - alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry); -#endif /* not MC_ALLOC */ + ALLOC_LCRECORD_TYPE (Lisp_Char_Table_Entry, &lrecord_char_table_entry); for (i = 0; i < 96; i++) cte->level2[i] = initval; @@ -651,11 +639,7 @@ Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (entry); int i; Lisp_Char_Table_Entry *ctenew = -#ifdef MC_ALLOC - alloc_lrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry); -#else /* not MC_ALLOC */ - alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry); -#endif /* not MC_ALLOC */ + ALLOC_LCRECORD_TYPE (Lisp_Char_Table_Entry, &lrecord_char_table_entry); for (i = 0; i < 96; i++) { @@ -684,11 +668,7 @@ CHECK_CHAR_TABLE (char_table); ct = XCHAR_TABLE (char_table); -#ifdef MC_ALLOC - ctnew = alloc_lrecord_type (Lisp_Char_Table, &lrecord_char_table); -#else /* not MC_ALLOC */ - ctnew = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table); -#endif /* not MC_ALLOC */ + ctnew = ALLOC_LCRECORD_TYPE (Lisp_Char_Table, &lrecord_char_table); ctnew->type = ct->type; ctnew->parent = ct->parent; ctnew->default_ = ct->default_; @@ -1080,11 +1060,7 @@ int lb = XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE; if (CHAR_TABLE_ENTRYP (ct->level1[lb]) && !OBJECT_DUMPED_P (ct->level1[lb])) -#ifdef MC_ALLOC - free_lrecord (ct->level1[lb]); -#else /* not MC_ALLOC */ - free_lcrecord (ct->level1[lb]); -#endif /* not MC_ALLOC */ + FREE_LCRECORD (ct->level1[lb]); ct->level1[lb] = val; } break;