JSVAL TRUE
From MDC
jsval constants that represent the JavaScript values true and false.
[edit] Syntax
#define JSVAL_TRUE /* ... */ #define JSVAL_FALSE /* ... */
[edit] Description
JSVAL_TRUE and JSVAL_FALSE are jsval constants that represent the JavaScript boolean values, true and false. They are equivalent to BOOLEAN_TO_JSVAL(JS_TRUE) and BOOLEAN_TO_JSVAL(JS_FALSE), respectively.
Take care not to confuse the jsval constants JSVAL_TRUE and JSVAL_FALSE with the JSBool constants JS_TRUE and JS_FALSE. jsval values must not be used as C true/false values; there is no guarantee that the C bit-pattern of any particular jsval is zero or nonzero. By contrast, JSBool is a C integer type, and it is guaranteed that JS_TRUE == 1 and JS_FALSE == 0. Unfortunately, the C/C++ type rules do not enforce correct usage of these types.