JSConstDoubleSpec 编辑
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 | double or int32_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 removedflags
andspare
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论