BOOLEAN_TO_JSVAL

Cast a C integer to a boolean jsval without any type checking or error handling.

Syntax

BOOLEAN_TO_JSVAL(b)
Name Type Description
b JSBool or int C integer value to be converted to a boolean jsval.

Description

BOOLEAN_TO_JSVAL converts a JSBool or integer argument, b, to a boolean jsval.

If b is 0 or JS_FALSE, the result is JSVAL_FALSE.

If b is 1 or JS_TRUE, the result is JSVAL_TRUE.

Warning:

See Also

MXR ID Search for BOOLEAN_TO_JSVAL

JSVAL_TO_BOOLEAN

Document Tags and Contributors

Contributors to this page: Nickolay, Dria, Callek, Jorend, MMondor
Last updated by: Jorend,