Re: decoding of long Int

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
On 10/9/09 6:51 AM, PATIL Kailas wrote:
> name = 140340262156644
> classword = 140340131011560
>
> Does anyone knows how to decode this type of values?

Decode in what sense?  What the integer means depends on the exact field 
you're looking at.  Sometimes it's just an integer (e.g. a file size). 
In the case of classword, it's a tagged pointer if it came out of a 
JSObject.

In your case, |name| is of type jsval; you can use the various JSAPI 
macros/functions (JSVAL_IS_*, JSVAL_TO_*, etc) to interrogate it.  That 
particular jsval happens to be a tagged pointer to a JSString.

Presumably you're on a 64-bit system, which is why the pointers look 
like that.

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.