JSBool JS_ValueToInteger()

Usage

JSBool JS_ValueToInteger(JSContext *cx, jsval v, long *lp); 

Description

Method; extracts a function argument from a jsval structure, converts it to an integer (if possible), and passes the converted value back to the caller.

Arguments

JSContext *cx, jsval v, long *lp

Returns

A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.