Skip to content

Instantly share code, notes, and snippets.

Created Nov 17, 2013
Embed
What would you like to do?
xcut
47 # if defined(DEBUG) && !defined(JS_NO_JSVAL_JSID_STRUCT_TYPES)
48 # define JS_USE_JSID_STRUCT_TYPES
49 # endif
50
51 # ifdef JS_USE_JSID_STRUCT_TYPES
52 struct jsid
53 {
54 size_t asBits;
55 bool operator==(jsid rhs) const { return asBits == rhs.asBits; }
56 bool operator!=(jsid rhs) const { return asBits != rhs.asBits; }
57 };
58 # define JSID_BITS(id) (id.asBits)
59 # else /* defined(JS_USE_JSID_STRUCT_TYPES) */
60 typedef ptrdiff_t jsid;
61 # define JSID_BITS(id) (id)
62 # endif /* defined(JS_USE_JSID_STRUCT_TYPES) */
63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment