Skip to content

Instantly share code, notes, and snippets.

Created November 17, 2013 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/7510955 to your computer and use it in GitHub Desktop.
Save anonymous/7510955 to your computer and use it in GitHub Desktop.
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