Macros in the JS API define:
· Fixed, named values that can be substituted in source code to improve readability and maintenance.
· Calculated, named values that may differ in value depending on the architecture and operating system of the host machine where a script runs.
· Pseudo functions, such as JSVAL_IS_OBJECT, that offer a shorthand way to perform logical tests, or sometimes to perform complex calculations that are frequently used by the JavaScript engine.
The following section lists macros defined in the JS API, and notes restrictions on their uses where applicable. For example, some macro values are used only within certain data structures.
NOTE: Many macros, structure definitions, and functions, take or return values of type jsval. While the definition of jsval is not part of the API proper, you should know that it is a bit-shifted integer value that is used throughout the JS engine. Given a C integer value, a corresponding jsval is bit-shifted left to accommodate a three-bit tag field that the JS engine uses to identify the type of value represented by the value in JavaScript. A jsval may represent any known JS data type.
Contents:
|
|
|