Subj : Re: unsigned long To : netscape.public.mozilla.jseng From : Jens Thiele Date : Thu Apr 15 2004 03:35 pm Thibaut wrote: > I don't know how to resolve this error, if someone can help ... lengthp is a > jsint like it's said in the api... ?! > how can i convert a jsint (long) to unsigned long ? > > > /////////// my code /////////////////// > jsint lengthp; > if (!JS_GetArrayLength(cx, array_children,&lengthp)) > return JS_FALSE; > ///////////////////////////////////////////// > error C2664: 'JS_GetArrayLength' : cannot convert parameter 3 from 'long *' > to 'unsigned long *' > > it is in fact a jsuint this is a bug in the docu jsapi.h:1055: (perhaps you have a different version => different line number but probably it is a jsuint anyway) extern JS_PUBLIC_API(JSBool) JS_GetArrayLength(JSContext *cx, JSObject *obj, jsuint *lengthp); .