Subj : Re: spidermonkey docu To : Sterling Bates From : Brendan Eich Date : Thu Apr 08 2004 07:01 pm Sterling Bates wrote: > "Brendan Eich" wrote in message > news:40758E48.7080804@meer.net... > 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 ? > > > I've attached a change that might suffice. > > Sterling > > > > 1839c1839 > < JS_ValueToInt32 converts a specified JS value, v, to a JS double, and then to a 32-bit integer, if it fits. If the double is out of range, JS_ValueToInt32 reports an error and conversion fails. The double rounded to the nearest integer value.

> --- > >> JS_ValueToInt32 converts a specified JS value, v, to a 32-bit integer. If v is not a valid number, JS_ValueToInt32 reports an error and conversion fails. A double is rounded to the nearest integer value.

You want to keep the part about out of range, perhaps specifying the range of a 32-bit signed integer. Saying "not a valid number" does not mean the same thing -- if anything, it means v is a NaN. Also, can you attach patches in a separate MIME part with the right MIME type (text/plain, I guess)? Thanks, /be .