eapi-bump librsvg
[sgilles-overlay.git] / www-client / elinks / files / elinks-0.12_pre5-sm185-jsval-fixes.patch
blobee2e5e8d633ff5c98b008eb08c503b6dba822f0c
1 --- a/src/scripting/smjs/action_object.c 2012-06-28 11:46:58.000000000 -0400
2 +++ b/src/scripting/smjs/action_object.c 2012-06-28 11:52:42.000000000 -0400
3 @@ -50,7 +50,7 @@
4 assert(smjs_ctx);
5 if_assert_failed return JS_FALSE;
7 - value = JS_FALSE;
8 + value = JSVAL_FALSE;
10 if (JS_TRUE != JS_ValueToObject(ctx, argv[-2], &fn_obj)) {
11 JS_SET_RVAL(ctx, rval, value);
12 @@ -76,7 +76,7 @@
14 do_action(hop->ses, hop->action_id, 1);
16 - value = JS_TRUE;
17 + value = JSVAL_TRUE;
18 JS_SET_RVAL(ctx, rval, value);
20 return JS_TRUE;
21 --- a/src/scripting/smjs/bookmarks.c 2012-06-28 11:57:40.000000000 -0400
22 +++ b/src/scripting/smjs/bookmarks.c 2012-06-28 12:08:20.000000000 -0400
23 @@ -250,11 +250,20 @@
25 /* @bookmark_folder_class.getProperty */
26 static JSBool
27 +#if JS_VERSION >= 185
28 +bookmark_folder_get_property(JSContext *ctx, JSObject *obj, jsid iid, jsval *vp)
29 +#else
30 bookmark_folder_get_property(JSContext *ctx, JSObject *obj, jsid id, jsval *vp)
31 +#endif
33 struct bookmark *bookmark;
34 struct bookmark *folder;
35 unsigned char *title = NULL;
36 +#if JS_VERSION >= 185
37 + jsval id;
38 + if (!JS_IdToValue(ctx,iid,&id))
39 + return JS_FALSE;
40 +#endif
42 /* This can be called if @obj if not itself an instance of the
43 * appropriate class but has one in its prototype chain. Fail
44 --- a/src/scripting/smjs/elinks_object.c 2012-06-28 12:11:15.000000000 -0400
45 +++ b/src/scripting/smjs/elinks_object.c 2012-06-28 12:14:50.000000000 -0400
46 @@ -185,7 +185,7 @@
47 method, rval))
48 return JS_FALSE;
50 - if (JSVAL_VOID == *rval)
51 + if (JSVAL_IS_VOID(*rval))
52 return JS_FALSE;
54 return JS_CallFunctionValue(smjs_ctx, smjs_elinks_object,
55 --- a/src/scripting/smjs/globhist.c 2012-06-28 12:20:25.000000000 -0400
56 +++ b/src/scripting/smjs/globhist.c 2012-06-28 12:20:15.000000000 -0400
57 @@ -201,11 +201,20 @@
59 /* @smjs_globhist_class.getProperty */
60 static JSBool
61 -smjs_globhist_get_property(JSContext *ctx, JSObject *obj, jsid id, jsval *vp)
62 +#if JS_VERSION >= 185
63 +smjs_globhist_get_property(JSContext *ctx, JSObject *obj, jsid iid, jsval *vp)
64 +#else
65 +smjs_globhist_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
66 +#endif
68 JSObject *jsobj;
69 unsigned char *uri_string;
70 struct global_history_item *history_item;
71 +#if JS_VERSION >= 185
72 + jsval id;
73 + if (!JS_IdToValue(ctx,iid,&id))
74 + return JS_FALSE;
75 +#endif
77 uri_string = JS_EncodeString(ctx, JS_ValueToString(ctx, id));
78 if (!uri_string) goto ret_null;
79 --- a/src/scripting/smjs/keybinding.c 2012-06-28 12:21:39.000000000 -0400
80 +++ b/src/scripting/smjs/keybinding.c.new 2012-06-28 12:48:00.000000000 -0400
81 @@ -17,11 +17,20 @@
83 /* @keymap_class.getProperty */
84 static JSBool
85 -keymap_get_property(JSContext *ctx, JSObject *obj, jsid id, jsval *vp)
86 +#if JS_VERSION >= 185
87 +keymap_get_property(JSContext *ctx, JSObject *obj, jsid iid, jsval *vp)
88 +#else
89 +keymap_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
90 +#endif
92 unsigned char *action_str;
93 const unsigned char *keystroke_str;
94 int *data;
95 +#if JS_VERSION >= 185
96 + jsval id;
97 + if (!JS_IdToValue(ctx,iid,&id))
98 + return JS_FALSE;
99 +#endif
101 /* This can be called if @obj if not itself an instance of the
102 * appropriate class but has one in its prototype chain. Fail
103 @@ -70,11 +79,20 @@
105 /* @keymap_class.setProperty */
106 static JSBool
107 -keymap_set_property(JSContext *ctx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
108 +#if JS_VERSION >= 185
109 +keymap_set_property(JSContext *ctx, JSObject *obj, jsid iid, JSBool strict, jsval *vp)
110 +#else
111 +keymap_set_property(JSContext *ctx, JSObject *obj, jsval id, JSBool strict, jsval *vp)
112 +#endif
114 int *data;
115 unsigned char *keymap_str;
116 const unsigned char *keystroke_str;
117 +#if JS_VERSION >= 185
118 + jsval id;
119 + if (!JS_IdToValue(ctx,iid,&id))
120 + return JS_FALSE;
121 +#endif
123 /* This can be called if @obj if not itself an instance of the
124 * appropriate class but has one in its prototype chain. Fail