Mercurial > hg > xemacs-beta
comparison src/elhash.c @ 464:5aa1854ad537 r21-2-47
Import from CVS: tag r21-2-47
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:45:51 +0200 |
parents | 0784d089fdc9 |
children | 4a8bb4aa9740 |
comparison
equal
deleted
inserted
replaced
463:a158004111cd | 464:5aa1854ad537 |
---|---|
1198 goto again; | 1198 goto again; |
1199 } | 1199 } |
1200 | 1200 |
1201 return Qnil; | 1201 return Qnil; |
1202 } | 1202 } |
1203 | |
1204 /* #### If the Lisp function being called does a puthash and this | |
1205 #### causes the hash table to be resized, the results will be quite | |
1206 #### random and we will likely crash. To fix this, either set a | |
1207 #### flag in the hash table while we're mapping and signal an error | |
1208 #### when new entries are added, or fix things to make this | |
1209 #### operation work properly, like this: Store two hash tables in | |
1210 #### each hash table object -- the second one is written to when | |
1211 #### you do a puthash inside of a mapping operation, and the | |
1212 #### various operations need to check both hash tables for entries. | |
1213 #### As soon as the last maphash over a particular hash table | |
1214 #### object terminates, the entries in the second table are added | |
1215 #### to the first (using an unwind-protect). --ben */ | |
1203 | 1216 |
1204 /* Map *C* function FUNCTION over the elements of a lisp hash table. */ | 1217 /* Map *C* function FUNCTION over the elements of a lisp hash table. */ |
1205 void | 1218 void |
1206 elisp_maphash (maphash_function_t function, | 1219 elisp_maphash (maphash_function_t function, |
1207 Lisp_Object hash_table, void *extra_arg) | 1220 Lisp_Object hash_table, void *extra_arg) |