Subj : Re: JSVAL_TO_INT and INT_TOJSVAL for unsigned 64 bit integers To : Manoj Karekar From : Brendan Eich Date : Thu Apr 08 2004 11:32 am Manoj Karekar wrote: > Hi, > Is there any support to convert 64 bit unsigned integers to jsval and > back ? No. > I am trying to use INT_TO_JSVAL and JSVAL_TO_INT but it corrupts the > value probably because it only supports integers upto 30 bits. 31 bits, you mean. "It" doesn't corrupt anything when used properly. > Is there any solution or work around to get rid of this problem ? It's not a problem if you can fit the 64-bit number into a double precision float, at some loss of precision. See JS_NewNumberValue. The number domain being limited to IEEE double is a requirement of the ECMA-262 specification. If you insist on 64-bit int domain, you are using the wrong language. You want JS2, or Java, or C#, or .... /be .