This article covers features introduced in SpiderMonkey 17
Describes a double and integer value and assigns it a name.
Syntax
template<typename T>
struct JSConstScalarSpec {
    const char *name;
    T val;
/*
    uint8_t         flags;    // Obsolete from JSAPI 35
    uint8_t         spare[3]; // Obsolete from JSAPI 35
*/
};
typedef JSConstScalarSpec<double> JSConstDoubleSpec;
typedef JSConstScalarSpec<int32_t> JSConstIntegerSpec; // Added in SpiderMonkey 38
| Name | Type | Description | 
|---|---|---|
| val | doubleorint32_t | Value for the double or integer. | 
| name | const char * | Name to assign the double. | 
| flags | uint8_t | Property attributes for the double. Obsolete since JSAPI 35 Currently these can be 0 or more of the following values OR'd:
 If this field is  | 
| spare | uint8_t [3] | Reserved for future use. Obsolete since JSAPI 35 | 
Description
JSConstDoubleSpecs is used to define a set of double values that are assigned as properties to an object using JS_DefineConstDoubles.
JSConstIntegerSpecs is used to define a set of double values that are assigned as properties to an object using JS_DefineConstIntegers.
See Also
- MXR ID Search for JSConstDoubleSpec
- MXR ID Search for JSConstIntegerSpec
- JS_DefineConstDoubles.
- JS_DefineConstIntegers
- bug 1066020 - changed to template, and removedflagsandspare