Specifications
C-Level Extensibility 257
Returns
A Boolean value that indicates success (JS_TRUE) or failure (JS_FALSE).
JSBool JS_DoubleToValue()
Description
Stores a floating-point number return value in a jsval.
Arguments
JSContext *cx, double dv, jsval *vp
• cx is the opaque JSContext pointer that passed to the JavaScript function.
• dv is an 8-byte floating-point number.
• vp is a pointer to the jsval into which the contents of the double should be copied.
Returns
A Boolean value that indicates success (JS_TRUE) or failure (JS_FALSE).
JSVal JS_BooleanToValue()
Description
Stores a Boolean return value in a jsval structure.
Arguments
JSBool bv
Returns
A JSVal structure that contains the Boolean value that you passed to the function as an argument.
JSVal JS_IntegerToValue()
Description
Stores an integer return value in a jsval.
Arguments
long lv
Returns
A JSVal structure that contains the integer that you passed to the function as an argument.
JSVal JS_ObjectToValue()
Description
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
Returns
A JSVal structure that contains the object that you passed to the function as an argument.