User Guide
The C-level API 549
JSVal JS_IntegerToValue()
Usage
jsval JS_IntegerToValue(long lv);
Description
Method; converts a long integer value to JSVal structure.
Arguments
lv
■ The lv argument is the long integer value that you want to convert to a jsval structure.
Returns
A JSVal structure that contains the integer that passed to the function as an argument.
JSVal JS_ObjectToValue()
Usage
jsval JS_ObjectToValue(JSObject *obj);
Description
Method; stores an object return value in a JSVal. Use JS_ NewArrayObject() to create an
array object; use
JS_SetElement() to define its contents.
Arguments
JSObject *obj
■ The obj argument is a pointer to the JSObject object that you want to convert to a
JSVal structure.
Returns
A JSVal structure that contains the object that you passed to the function as an argument.