Subj : Re: using js_HashString in a getter callback To : Brann Joly From : Brendan Eich Date : Wed May 19 2004 04:23 pm Brann Joly wrote: > > As far as i know, id is computed by hashing the name of the property. How > should i deal with that? > Is using the JSHashNumber js_HashString(JSString *str); function the good > solution? > (i would compute the hash of the name using this function when i define the > property, and associate the JSHashNumber with some personal data into a > hashtable) Please stick to the public API. The function is small enough that you might copy its guts, and you might also improve on it, at least for the dictionary of ids your embedding will end up hashing. How would you handle a non-string, i.e., int id? /be .