]> git.pld-linux.org Git - packages/gjs.git/commitdiff
- use macros to detect JSVAL_NULL/JSVAL_VOID
authorArtur Frysiak <artur@frysiak.net>
Tue, 27 Dec 2011 15:49:43 +0000 (15:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- rel. 9

Changed files:
    gjs.spec -> 1.36
    jsval.patch -> 1.1

gjs.spec
jsval.patch [new file with mode: 0644]

index 44b43869fa5db05b579cec51f5fdc8563e1d9046..99f0e67752f21ddb5cdb3ee2ffda692f99f8333e 100644 (file)
--- a/gjs.spec
+++ b/gjs.spec
@@ -2,13 +2,14 @@ Summary:      JavaScript bindings for GNOME
 Summary(pl.UTF-8):     Wiązania JavaScript dla GNOME
 Name:          gjs
 Version:       1.30.0
-Release:       8
+Release:       9
 License:       MIT and (MPL v1.1 / GPL v2+ / LGPL v2+)
 Group:         Libraries
 Source0:       http://ftp.gnome.org/pub/GNOME/sources/gjs/1.30/%{name}-%{version}.tar.xz
 # Source0-md5: 908c1c8654d141d64aac07d57de9a457
 Patch0:                %{name}-rpath.patch
 Patch1:                am.patch
+Patch2:                jsval.patch
 URL:           http://live.gnome.org/Gjs
 BuildRequires: autoconf >= 2.61
 BuildRequires: automake
@@ -55,6 +56,7 @@ Pliki nagłówkowe biblioteki gjs.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__libtoolize}
diff --git a/jsval.patch b/jsval.patch
new file mode 100644 (file)
index 0000000..952834f
--- /dev/null
@@ -0,0 +1,69 @@
+--- gjs-1.30.0/modules/console.c.wiget 2011-12-27 16:42:01.069979148 +0100
++++ gjs-1.30.0/modules/console.c       2011-12-27 16:42:40.418340591 +0100
+@@ -224,7 +224,7 @@ gjs_console_interact(JSContext *context,
+         if (JS_GetPendingException(context, &result)) {
+             str = JS_ValueToString(context, result);
+             JS_ClearPendingException(context);
+-        } else if (result == JSVAL_VOID) {
++        } else if (JSVAL_IS_VOID(result)) {
+             goto next;
+         } else {
+             str = JS_ValueToString(context, result);
+--- gjs-1.30.0/gjs/byteArray.c.wiget   2011-12-27 16:37:55.066927188 +0100
++++ gjs-1.30.0/gjs/byteArray.c 2011-12-27 16:38:50.964585277 +0100
+@@ -775,7 +775,7 @@ from_array_func(JSContext *context,
+             goto out;
+         }
+-        if (elem == JSVAL_VOID)
++        if (JSVAL_IS_VOID(elem))
+             continue;
+         if (!gjs_value_to_byte(context, elem, &b))
+--- gjs-1.30.0/gjs/importer.c.wiget    2011-12-27 16:42:55.094396523 +0100
++++ gjs-1.30.0/gjs/importer.c  2011-12-27 16:45:12.555353498 +0100
+@@ -534,7 +534,7 @@ do_import(JSContext  *context,
+             goto out;
+         }
+-        if (elem == JSVAL_VOID)
++        if (JSVAL_IS_VOID(elem))
+             continue;
+         if (!JSVAL_IS_STRING(elem)) {
+@@ -566,7 +566,7 @@ do_import(JSContext  *context,
+                                         module_obj,
+                                         name,
+                                         &obj_val)) {
+-                if (obj_val != JSVAL_VOID &&
++                if (!JSVAL_IS_VOID(obj_val) &&
+                     JS_DefineProperty(context, obj,
+                                       name, obj_val,
+                                       NULL, NULL,
+@@ -793,7 +793,7 @@ importer_new_enumerate(JSContext  *conte
+                 return JS_FALSE;
+             }
+-            if (elem == JSVAL_VOID)
++            if (JSVAL_IS_VOID(elem))
+                 continue;
+             if (!JSVAL_IS_STRING(elem)) {
+@@ -868,7 +868,7 @@ importer_new_enumerate(JSContext  *conte
+             return JS_FALSE;
+         }
+-        if (*state_p == JSVAL_NULL) /* Iterating prototype */
++        if (JSVAL_IS_NULL(*state_p)) /* Iterating prototype */
+             return JS_TRUE;
+         iter = JSVAL_TO_PRIVATE(*state_p);
+@@ -890,7 +890,7 @@ importer_new_enumerate(JSContext  *conte
+     }
+     case JSENUMERATE_DESTROY: {
+-        if (state_p && *state_p != JSVAL_NULL) {
++        if (state_p && JSVAL_IS_NULL(*state_p)) {
+             iter = JSVAL_TO_PRIVATE(*state_p);
+             importer_iterator_free(iter);
This page took 0.097015 seconds and 4 git commands to generate.