Bug 560815 - PRIVATE_TO_JSVAL(NULL) yields warning: NULL used in arithmetic with gcc 4.2.1. r=jorendorff.

--HG--
extra : rebase_source : bbbf5e801b7ae5bc0c7c30864e487a03ddcf72fc
This commit is contained in:
timeless@mozdev.org 2010-04-23 20:17:36 -05:00
parent 63f9c2e3d5
commit ca917d7197

View File

@ -270,7 +270,7 @@ BOOLEAN_TO_JSVAL(JSBool b)
/* A private data pointer (2-byte-aligned) can be stored as an int jsval. */
#define JSVAL_TO_PRIVATE(v) ((void *)((v) & ~JSVAL_INT))
#define PRIVATE_TO_JSVAL(p) ((jsval)(p) | JSVAL_INT)
#define PRIVATE_TO_JSVAL(p) ((jsval)(ptrdiff_t)(p) | JSVAL_INT)
/* Property attributes, set in JSPropertySpec and passed to API functions. */
#define JSPROP_ENUMERATE 0x01 /* property is visible to for/in loop */