DOUBLE TO JSVAL
From MDC
Casts a pointer to a GC-allocated jsdouble to type jsval.
[edit] Syntax
DOUBLE_TO_JSVAL(dp);
| Name | Type | Description |
|---|---|---|
dp |
jsdouble * |
The pointer to convert to a jsval. |
[edit] Description
DOUBLE_TO_JSVAL is the inverse of JSVAL_TO_DOUBLE. The argument, dp, must be a pointer to a jsdouble created by the JavaScript engine. It must not point to a variable, a field of an object, or memory allocated by the application.
To convert a C float, double, or jsdouble to type jsval, use JS_NewNumberValue instead.