From: Ken A. <kan...@bb...> - 2004-01-05 20:19:36
|
Is this a good idea? I've checked in a version of string-set! to allow for better use of slib. The definition is: (define (string-set! s i v) (.hash$# s 0) (vector-set! (.value$# s) i v)) So when a character is set the hashcode is set to 0 so it will be recomputed when needed. So as long as you stop calling string-set! on a string before putting it in a hashtable you'll be OK. Using string-set! on a string that in a hashtable will of course be a bad thing to do. I've put this in jsint/primproc.scm because it is part of r4rs, but maybe it should get located with slib/ i can't decide. k |