packages: gjs/gjs.spec, gjs/jsval.patch (NEW) - use macros to detect JSVAL_...

wiget wiget at pld-linux.org
Tue Dec 27 16:49:49 CET 2011


Author: wiget                        Date: Tue Dec 27 15:49:49 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use macros to detect JSVAL_NULL/JSVAL_VOID
- rel. 9

---- Files affected:
packages/gjs:
   gjs.spec (1.35 -> 1.36) , jsval.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/gjs/gjs.spec
diff -u packages/gjs/gjs.spec:1.35 packages/gjs/gjs.spec:1.36
--- packages/gjs/gjs.spec:1.35	Tue Dec 27 16:23:21 2011
+++ packages/gjs/gjs.spec	Tue Dec 27 16:49:43 2011
@@ -3,13 +3,14 @@
 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
@@ -56,6 +57,7 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__libtoolize}
@@ -126,6 +128,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.36  2011/12/27 15:49:43  wiget
+- use macros to detect JSVAL_NULL/JSVAL_VOID
+- rel. 9
+
 Revision 1.35  2011/12/27 15:23:21  wiget
 - workaround pkglibdir sanity checks introduced in Automake 1.11.2
 - rel. 8

================================================================
Index: packages/gjs/jsval.patch
diff -u /dev/null packages/gjs/jsval.patch:1.1
--- /dev/null	Tue Dec 27 16:49:49 2011
+++ packages/gjs/jsval.patch	Tue Dec 27 16:49:43 2011
@@ -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);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gjs/gjs.spec?r1=1.35&r2=1.36&f=u



More information about the pld-cvs-commit mailing list