X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Felhash.c;h=34c22c5949912790a5c693106f489b7137b0244f;hp=a8021236eb034e42f57c707ea48de5aa4dc7dc3e;hb=a71e0987b7080176e0046b0b0ed72a9a70e2571d;hpb=0e904fc68e7429eda789ded8f73075ead2ad2584 diff --git a/src/elhash.c b/src/elhash.c index a802123..34c22c5 100644 --- a/src/elhash.c +++ b/src/elhash.c @@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" +#include #include "bytecode.h" #include "elhash.h" @@ -364,11 +365,28 @@ finalize_hash_table (void *header, int for_disksave) } } +static const struct lrecord_description hentry_description_1[] = { + { XD_LISP_OBJECT, offsetof(hentry, key), 2 }, + { XD_END } +}; + +static const struct struct_description hentry_description = { + sizeof(hentry), + hentry_description_1 +}; + +static const struct lrecord_description hash_table_description[] = { + { XD_SIZE_T, offsetof(Lisp_Hash_Table, size) }, + { XD_STRUCT_PTR, offsetof(Lisp_Hash_Table, hentries), XD_INDIRECT(0), &hentry_description }, + { XD_END } +}; + DEFINE_LRECORD_IMPLEMENTATION ("hash-table", hash_table, mark_hash_table, print_hash_table, finalize_hash_table, /* #### Implement hash_table_hash()! */ hash_table_equal, 0, + hash_table_description, Lisp_Hash_Table); static Lisp_Hash_Table *