comparison src/elhash.c @ 420:41dbb7a9d5f2 r21-2-18

Import from CVS: tag r21-2-18
author cvs
date Mon, 13 Aug 2007 11:24:09 +0200
parents 697ef44129c6
children 11054d720c21
comparison
equal deleted inserted replaced
419:66615b78f1a5 420:41dbb7a9d5f2
362 xfree (ht->hentries); 362 xfree (ht->hentries);
363 ht->hentries = 0; 363 ht->hentries = 0;
364 } 364 }
365 } 365 }
366 366
367 static const struct lrecord_description hentry_description_1[] = {
368 { XD_LISP_OBJECT, offsetof(hentry, key), 2 },
369 { XD_END }
370 };
371
372 static const struct struct_description hentry_description = {
373 sizeof(hentry),
374 hentry_description_1
375 };
376
377 static const struct lrecord_description hash_table_description[] = {
378 { XD_SIZE_T, offsetof(Lisp_Hash_Table, size) },
379 { XD_STRUCT_PTR, offsetof(Lisp_Hash_Table, hentries), XD_INDIRECT(0), &hentry_description },
380 { XD_END }
381 };
382
367 DEFINE_LRECORD_IMPLEMENTATION ("hash-table", hash_table, 383 DEFINE_LRECORD_IMPLEMENTATION ("hash-table", hash_table,
368 mark_hash_table, print_hash_table, 384 mark_hash_table, print_hash_table,
369 finalize_hash_table, 385 finalize_hash_table,
370 /* #### Implement hash_table_hash()! */ 386 /* #### Implement hash_table_hash()! */
371 hash_table_equal, 0, 387 hash_table_equal, 0,
388 hash_table_description,
372 Lisp_Hash_Table); 389 Lisp_Hash_Table);
373 390
374 static Lisp_Hash_Table * 391 static Lisp_Hash_Table *
375 xhash_table (Lisp_Object hash_table) 392 xhash_table (Lisp_Object hash_table)
376 { 393 {