Subj : Re: Another JS question To : netscape.public.mozilla.jseng From : Sterling Bates Date : Tue May 04 2004 08:48 pm "Brendan Eich" wrote in message news:40980CC1.8040309@meer.net... > NB: null, not NULL -- the JS reserved identifier is lowercase. Note > that I use the C standard macro NULL (all-caps) in context to mean a > null pointer in C. [...] > So I would say "If v is null or undefined, ...." [...] > to *objp -- watch out for missing dereferencing. [...] > Not sure I want the API docs pointing here. OK, based on that I have two possibilities. The first is good if there is no contradiction between "conformance" and "depature from the spec" in this instance. Otherwise, the second is probably better. 1. If v is null or undefined, JS_ValueToObject assigns NULL to *objp and returns JS_TRUE. This is a known departure from the ECMA 262-3 specification, which was written after SpiderMonkey. 2. If v is null or undefined, JS_ValueToObject assigns NULL to *objp and returns JS_TRUE. Sterling .