Extending Flash |
|
|
|
| C-Level Extensibility > The C-level API > JSBool JS_ValueToInteger() | |||
JSBool JS_ValueToInteger(JSContext *cx, jsval v, long *lp);
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.
JSContext *cx, jsval v, long *lp
cx argument is the opaque JSContext pointer that passes to the JavaScript function.v argument is the jsval structure from which the integer is to be extracted.lp argument is a pointer to a 4-byte integer. This function stores the converted value in *lp.A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.
|
|
|
|