Subj : Re: spidermonkey docu To : Jens Thiele From : Brendan Eich Date : Thu Apr 08 2004 11:39 am Jens Thiele wrote: >>But the doc does not lie. Converting to double and then to int loses no >>information, it's just less efficient than what's actually done in the >>implementation. >> >>So I'm not sure why you say the doc is wrong. It is not in error, it's >>just (as usual, thanks to whoever wrote it for Netscape, ages ago) a bit >>misleading about implementation, a bit too detailed in that respect, and >>oddly not detailed enough in other ways. > > > well yes > it just caused me to do: > if (JSVAL_IS_INT(v)) { > ... = JSVAL_TO_INT(v); > }else{ > js_ValueToInt32 > } Ok, fair point -- I was considering only correctness, but efficiency counts too, and the docs shouldn't mislead on that scale. More to fix. Anyone want to try a patch for http://lxr.mozilla.org/mozilla/source/js/docs/jsref.xml ? /be .