]>
Commit | Line | Data |
---|---|---|
a1ecd44b AF |
1 | --- gjs-1.30.0/modules/console.c.wiget 2011-12-27 16:42:01.069979148 +0100 |
2 | +++ gjs-1.30.0/modules/console.c 2011-12-27 16:42:40.418340591 +0100 | |
3 | @@ -224,7 +224,7 @@ gjs_console_interact(JSContext *context, | |
4 | if (JS_GetPendingException(context, &result)) { | |
5 | str = JS_ValueToString(context, result); | |
6 | JS_ClearPendingException(context); | |
7 | - } else if (result == JSVAL_VOID) { | |
8 | + } else if (JSVAL_IS_VOID(result)) { | |
9 | goto next; | |
10 | } else { | |
11 | str = JS_ValueToString(context, result); | |
12 | --- gjs-1.30.0/gjs/byteArray.c.wiget 2011-12-27 16:37:55.066927188 +0100 | |
13 | +++ gjs-1.30.0/gjs/byteArray.c 2011-12-27 16:38:50.964585277 +0100 | |
14 | @@ -775,7 +775,7 @@ from_array_func(JSContext *context, | |
15 | goto out; | |
16 | } | |
17 | ||
18 | - if (elem == JSVAL_VOID) | |
19 | + if (JSVAL_IS_VOID(elem)) | |
20 | continue; | |
21 | ||
22 | if (!gjs_value_to_byte(context, elem, &b)) | |
23 | --- gjs-1.30.0/gjs/importer.c.wiget 2011-12-27 16:42:55.094396523 +0100 | |
24 | +++ gjs-1.30.0/gjs/importer.c 2011-12-27 16:45:12.555353498 +0100 | |
25 | @@ -534,7 +534,7 @@ do_import(JSContext *context, | |
26 | goto out; | |
27 | } | |
28 | ||
29 | - if (elem == JSVAL_VOID) | |
30 | + if (JSVAL_IS_VOID(elem)) | |
31 | continue; | |
32 | ||
33 | if (!JSVAL_IS_STRING(elem)) { | |
34 | @@ -566,7 +566,7 @@ do_import(JSContext *context, | |
35 | module_obj, | |
36 | name, | |
37 | &obj_val)) { | |
38 | - if (obj_val != JSVAL_VOID && | |
39 | + if (!JSVAL_IS_VOID(obj_val) && | |
40 | JS_DefineProperty(context, obj, | |
41 | name, obj_val, | |
42 | NULL, NULL, | |
43 | @@ -793,7 +793,7 @@ importer_new_enumerate(JSContext *conte | |
44 | return JS_FALSE; | |
45 | } | |
46 | ||
47 | - if (elem == JSVAL_VOID) | |
48 | + if (JSVAL_IS_VOID(elem)) | |
49 | continue; | |
50 | ||
51 | if (!JSVAL_IS_STRING(elem)) { | |
52 | @@ -868,7 +868,7 @@ importer_new_enumerate(JSContext *conte | |
53 | return JS_FALSE; | |
54 | } | |
55 | ||
56 | - if (*state_p == JSVAL_NULL) /* Iterating prototype */ | |
57 | + if (JSVAL_IS_NULL(*state_p)) /* Iterating prototype */ | |
58 | return JS_TRUE; | |
59 | ||
60 | iter = JSVAL_TO_PRIVATE(*state_p); | |
61 | @@ -890,7 +890,7 @@ importer_new_enumerate(JSContext *conte | |
62 | } | |
63 | ||
64 | case JSENUMERATE_DESTROY: { | |
65 | - if (state_p && *state_p != JSVAL_NULL) { | |
66 | + if (state_p && JSVAL_IS_NULL(*state_p)) { | |
67 | iter = JSVAL_TO_PRIVATE(*state_p); | |
68 | ||
69 | importer_iterator_free(iter); | |
9cfe439e AF |
70 | --- gjs-1.30.0/gjs/jsapi-util.c.wiget 2011-12-27 16:52:47.661184351 +0100 |
71 | +++ gjs-1.30.0/gjs/jsapi-util.c 2011-12-27 16:54:56.850873130 +0100 | |
72 | @@ -407,7 +407,7 @@ gjs_object_get_property(JSContext *cont | |
73 | ||
74 | JS_EndRequest(context); | |
75 | ||
76 | - return value != JSVAL_VOID; | |
77 | + return JSVAL_IS_VOID(value); | |
78 | } | |
79 | ||
80 | /* Returns whether the object had the property; if the object did | |
81 | @@ -434,7 +434,7 @@ gjs_object_require_property(JSContext | |
82 | if (value_p) | |
83 | *value_p = value; | |
84 | ||
85 | - if (value != JSVAL_VOID) { | |
86 | + if (JSVAL_IS_VOID(value)) { | |
87 | JS_ClearPendingException(context); /* in case JS_GetProperty() was on crack */ | |
88 | JS_EndRequest(context); | |
89 | return TRUE; | |
90 | @@ -550,7 +550,7 @@ gjs_init_class_dynamic(JSContext *c | |
91 | class_copy->base.name, &value)) | |
92 | goto error; | |
93 | } | |
94 | - g_assert(value != JSVAL_VOID); | |
95 | + g_assert(JSVAL_IS_VOID(value)); | |
96 | g_assert(prototype != NULL); | |
97 | ||
98 | /* Now manually define our constructor with a sane name, in the | |
99 | @@ -1277,7 +1277,7 @@ gjs_get_type_name(jsval value) | |
100 | { | |
101 | if (JSVAL_IS_NULL(value)) { | |
102 | return "null"; | |
103 | - } else if (value == JSVAL_VOID) { | |
104 | + } else if (JSVAL_IS_VOID(value)) { | |
105 | return "undefined"; | |
106 | } else if (JSVAL_IS_INT(value)) { | |
107 | return "integer"; |