comparison src/elhash.c @ 771:943eaba38521

[xemacs-hg @ 2002-03-13 08:51:24 by ben] The big ben-mule-21-5 check-in! Various files were added and deleted. See CHANGES-ben-mule. There are still some test suite failures. No crashes, though. Many of the failures have to do with problems in the test suite itself rather than in the actual code. I'll be addressing these in the next day or so -- none of the test suite failures are at all critical. Meanwhile I'll be trying to address the biggest issues -- i.e. build or run failures, which will almost certainly happen on various platforms. All comments should be sent to ben@xemacs.org -- use a Cc: if necessary when sending to mailing lists. There will be pre- and post- tags, something like pre-ben-mule-21-5-merge-in, and post-ben-mule-21-5-merge-in.
author ben
date Wed, 13 Mar 2002 08:54:06 +0000
parents fdefd0186b75
children e38acbeb1cae
comparison
equal deleted inserted replaced
770:336a418893b5 771:943eaba38521
1322 args[1] = pobj[0]; 1322 args[1] = pobj[0];
1323 args[2] = pobj[1]; 1323 args[2] = pobj[1];
1324 Ffuncall (countof (args), args); 1324 Ffuncall (countof (args), args);
1325 } 1325 }
1326 1326
1327 unbind_to (speccount, Qnil); 1327 unbind_to (speccount);
1328 UNGCPRO; 1328 UNGCPRO;
1329 1329
1330 return Qnil; 1330 return Qnil;
1331 } 1331 }
1332 1332
1366 1366
1367 for (pobj = objs, end = pobj + 2 * ht->count; pobj < end; pobj += 2) 1367 for (pobj = objs, end = pobj + 2 * ht->count; pobj < end; pobj += 2)
1368 if (function (pobj[0], pobj[1], extra_arg)) 1368 if (function (pobj[0], pobj[1], extra_arg))
1369 break; 1369 break;
1370 1370
1371 unbind_to (speccount, Qnil); 1371 unbind_to (speccount);
1372 UNGCPRO; 1372 UNGCPRO;
1373 } 1373 }
1374 1374
1375 /* Remove all elements of a lisp hash table satisfying *C* predicate PREDICATE. 1375 /* Remove all elements of a lisp hash table satisfying *C* predicate PREDICATE.
1376 PREDICATE must not modify HASH-TABLE. */ 1376 PREDICATE must not modify HASH-TABLE. */
1390 1390
1391 for (pobj = objs, end = pobj + 2 * ht->count; pobj < end; pobj += 2) 1391 for (pobj = objs, end = pobj + 2 * ht->count; pobj < end; pobj += 2)
1392 if (predicate (pobj[0], pobj[1], extra_arg)) 1392 if (predicate (pobj[0], pobj[1], extra_arg))
1393 Fremhash (pobj[0], hash_table); 1393 Fremhash (pobj[0], hash_table);
1394 1394
1395 unbind_to (speccount, Qnil); 1395 unbind_to (speccount);
1396 UNGCPRO; 1396 UNGCPRO;
1397 } 1397 }
1398 1398
1399 1399
1400 /************************************************************************/ 1400 /************************************************************************/
1640 /************************************************************************/ 1640 /************************************************************************/
1641 1641
1642 void 1642 void
1643 syms_of_elhash (void) 1643 syms_of_elhash (void)
1644 { 1644 {
1645 INIT_LRECORD_IMPLEMENTATION (hash_table);
1646
1647 DEFSUBR (Fhash_table_p); 1645 DEFSUBR (Fhash_table_p);
1648 DEFSUBR (Fmake_hash_table); 1646 DEFSUBR (Fmake_hash_table);
1649 DEFSUBR (Fcopy_hash_table); 1647 DEFSUBR (Fcopy_hash_table);
1650 DEFSUBR (Fgethash); 1648 DEFSUBR (Fgethash);
1651 DEFSUBR (Fremhash); 1649 DEFSUBR (Fremhash);
1687 DEFKEYWORD (Q_weakness); 1685 DEFKEYWORD (Q_weakness);
1688 DEFKEYWORD (Q_type); /* obsolete */ 1686 DEFKEYWORD (Q_type); /* obsolete */
1689 } 1687 }
1690 1688
1691 void 1689 void
1692 vars_of_elhash (void) 1690 init_elhash_once_early (void)
1693 { 1691 {
1692 INIT_LRECORD_IMPLEMENTATION (hash_table);
1693
1694 /* This must NOT be staticpro'd */ 1694 /* This must NOT be staticpro'd */
1695 Vall_weak_hash_tables = Qnil; 1695 Vall_weak_hash_tables = Qnil;
1696 dump_add_weak_object_chain (&Vall_weak_hash_tables); 1696 dump_add_weak_object_chain (&Vall_weak_hash_tables);
1697 } 1697 }