Mercurial > hg > xemacs-beta
diff src/rangetab.c @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | 41dbb7a9d5f2 |
children |
line wrap: on
line diff
--- a/src/rangetab.c Mon Aug 13 11:25:03 2007 +0200 +++ b/src/rangetab.c Mon Aug 13 11:26:11 2007 +0200 @@ -41,13 +41,13 @@ is not hard but just requires moving that stuff out of that file. */ static Lisp_Object -mark_range_table (Lisp_Object obj, void (*markobj) (Lisp_Object)) +mark_range_table (Lisp_Object obj) { struct Lisp_Range_Table *rt = XRANGE_TABLE (obj); int i; for (i = 0; i < Dynarr_length (rt->entries); i++) - markobj (Dynarr_at (rt->entries, i).val); + mark_object (Dynarr_at (rt->entries, i).val); return Qnil; } @@ -132,9 +132,35 @@ return hash; } +static const struct lrecord_description rte_description_1[] = { + { XD_LISP_OBJECT, offsetof(range_table_entry, val), 1 }, + { XD_END } +}; + +static const struct struct_description rte_description = { + sizeof(range_table_entry), + rte_description_1 +}; + +static const struct lrecord_description rted_description_1[] = { + XD_DYNARR_DESC(range_table_entry_dynarr, &rte_description), + { XD_END } +}; + +static const struct struct_description rted_description = { + sizeof(range_table_entry_dynarr), + rted_description_1 +}; + +static const struct lrecord_description range_table_description[] = { + { XD_STRUCT_PTR, offsetof(struct Lisp_Range_Table, entries), 1, &rted_description }, + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION ("range-table", range_table, mark_range_table, print_range_table, 0, - range_table_equal, range_table_hash, 0, + range_table_equal, range_table_hash, + range_table_description, struct Lisp_Range_Table); /************************************************************************/