Visit Mozilla.org

INT TO JSVAL

From MDC

Converts a specified integer value to a JS integer value.

[edit] Syntax

INT_TO_JSVAL(i)
Name Type Description
i any integer type C integer to convert to a jsval. Not all integers can be stored in a jsval; use INT_FITS_IN_JSVAL to test.

[edit] Description

INT_TO_JSVAL converts a C integer, i, to a jsval. If i does not fit into a jsval (see INT_FITS_IN_JSVAL), the result is still a JavaScript number, but its value is undefined.

To convert an integer jsval to a C integer, use JSVAL_IS_INT and JSVAL_TO_INT.

LXR ID Search for INT_TO_JSVAL