[DRE-commits] r2955 - in packages/ruby-gnome2/trunk/debian: . patches

terceiro-guest at alioth.debian.org terceiro-guest at alioth.debian.org
Tue Aug 26 12:55:23 UTC 2008


Author: terceiro-guest
Date: 2008-08-26 12:55:21 +0000 (Tue, 26 Aug 2008)
New Revision: 2955

Added:
   packages/ruby-gnome2/trunk/debian/patches/fix-object-allocation-during-gc-phase.patch
Modified:
   packages/ruby-gnome2/trunk/debian/changelog
   packages/ruby-gnome2/trunk/debian/control
   packages/ruby-gnome2/trunk/debian/patches/series
Log:
applying patch from BTS to fix RC bug



Modified: packages/ruby-gnome2/trunk/debian/changelog
===================================================================
--- packages/ruby-gnome2/trunk/debian/changelog	2008-08-22 00:20:55 UTC (rev 2954)
+++ packages/ruby-gnome2/trunk/debian/changelog	2008-08-26 12:55:21 UTC (rev 2955)
@@ -1,9 +1,17 @@
 ruby-gnome2 (0.17.0~rc1-4) UNRELEASED; urgency=low
 
+  [ Paul van Tilburg ]
   * Updated debian/watch with a regexp fix and inclusion of RC releases.
 
- -- Paul van Tilburg <paulvt at debian.org>  Sat, 19 Jul 2008 11:41:05 +0200
+  [ Antonio Terceiro ]
+  * debian/control: added myself in Uploaders.
+  * debian/patches/fix-object-allocation-during-gc-phase.patch: added as fix
+    for RC bug (Closes: #494515). Should probably be dropped in next upstream
+    release. Thanks for Peter De Wachter for picking the patches in upstream
+    SVN.
 
+ -- Antonio Terceiro <terceiro at softwarelivre.org>  Mon, 25 Aug 2008 18:54:30 -0300
+
 ruby-gnome2 (0.17.0~rc1-3) unstable; urgency=low
 
   * Install rbgcompat.h in libglib2-ruby1.8 (Closes: #489088).

Modified: packages/ruby-gnome2/trunk/debian/control
===================================================================
--- packages/ruby-gnome2/trunk/debian/control	2008-08-22 00:20:55 UTC (rev 2954)
+++ packages/ruby-gnome2/trunk/debian/control	2008-08-26 12:55:21 UTC (rev 2955)
@@ -2,7 +2,7 @@
 Section: libs
 Priority: optional
 Maintainer: Arnaud Cornet <acornet at debian.org>
-Uploaders: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>, Paul van Tilburg <paulvt at debian.org>, Michael Schutte <m.schutte.jr at gmail.com>
+Uploaders: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>, Paul van Tilburg <paulvt at debian.org>, Michael Schutte <m.schutte.jr at gmail.com>, Antonio Terceiro <terceiro at softwarelivre.org>
 Build-Depends: ruby-pkg-tools (>= 0.14), cdbs, debhelper (>= 4), ruby, ruby1.8, ruby1.8-dev, libgnomeui-dev, libglade2-dev, libgtkhtml2-dev, libpng12-dev, libgtkglext1-dev, libxmu-dev, libgtksourceview-dev, libpanel-applet2-dev, libgnomeprint2.2-dev (>= 2.8.0), libgnomeprintui2.2-dev (>= 2.6.0), librsvg2-dev (>= 2.8.0), libcairo-ruby, xulrunner-dev (>= 1.9~b5-4), libvte-dev (>= 0.12.1), libpoppler-glib-dev (>= 0.5.2), pkg-config, quilt, libgda2-dev (>= 1.2.4-1), libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev
 Standards-Version: 3.7.3
 Homepage: http://ruby-gnome2.sourceforge.jp/

Added: packages/ruby-gnome2/trunk/debian/patches/fix-object-allocation-during-gc-phase.patch
===================================================================
--- packages/ruby-gnome2/trunk/debian/patches/fix-object-allocation-during-gc-phase.patch	                        (rev 0)
+++ packages/ruby-gnome2/trunk/debian/patches/fix-object-allocation-during-gc-phase.patch	2008-08-26 12:55:21 UTC (rev 2955)
@@ -0,0 +1,217 @@
+diff -Nru ruby-gnome2-0.17.0~rc1-from-archive/glib/ChangeLog ruby-gnome2-0.17.0~rc1/glib/ChangeLog
+--- ruby-gnome2-0.17.0~rc1-from-archive/glib/ChangeLog	2008-08-21 21:15:03.000000000 -0300
++++ ruby-gnome2-0.17.0~rc1/glib/ChangeLog	2008-08-21 21:15:20.000000000 -0300
+@@ -1,3 +1,23 @@
++2008-07-27  Sjoerd Simons  <sjoerd at luon.net>
++
++	* src/rbgobj_closure.c: Only use G_REMOVE_RELATIVE when a closure is
++	directly invalidated. This prevents object creation when freeing the
++	closure from the garbage collector.
++
++2008-06-19  Kouhei Sutou  <kou at cozmixng.org>
++
++	* src/rbgobj_type.c (rbgobj_lookup_class_by_gtype_body): add
++	create_class option.
++
++	* src/rbgobject.h (GTYPE2CINFO_NO_CREATE): add.
++
++	* src/rbgobject.h, src/rbgobj_type.c
++	(rbgobj_lookup_class_by_gtype_full): add.
++
++	* src/rbgobj_typeinstance.c (each_cinfo): don't create object
++	during GC to work with ruby 1.8.7.
++	Reported by Kazuhiro NISHIYAMA. Thanks!!!
++
+ 2008-05-23  Kouhei Sutou  <kou at cozmixng.org>
+ 
+ 	* test/run-test.rb: use which not --version to detect make.
+diff -Nru ruby-gnome2-0.17.0~rc1-from-archive/glib/src/rbgobj_closure.c ruby-gnome2-0.17.0~rc1/glib/src/rbgobj_closure.c
+--- ruby-gnome2-0.17.0~rc1-from-archive/glib/src/rbgobj_closure.c	2008-08-21 21:15:03.000000000 -0300
++++ ruby-gnome2-0.17.0~rc1/glib/src/rbgobj_closure.c	2008-08-21 21:15:20.000000000 -0300
+@@ -142,9 +142,6 @@
+         GList *next;
+         for (next = rclosure->objects; next; next = next->next) {
+             GObject *object = G_OBJECT(next->data);
+-            VALUE obj = rbgobj_ruby_object_from_instance2(object, FALSE);
+-            if (!NIL_P(rclosure->rb_holder) && !NIL_P(obj))
+-                G_REMOVE_RELATIVE(obj, id_closures, rclosure->rb_holder);
+             g_object_weak_unref(object, rclosure_weak_notify, rclosure);
+         }
+         g_list_free(rclosure->objects);
+@@ -163,7 +160,16 @@
+     GRClosure *rclosure = (GRClosure*)closure;
+ 
+     if (rclosure->count > 0) {
++        GList *next;
++
+         rclosure->count = 1;
++        for (next = rclosure->objects; next; next = next->next) {
++            GObject *object = G_OBJECT(next->data);
++            VALUE obj = rbgobj_ruby_object_from_instance2(object, FALSE);
++            if (!NIL_P(rclosure->rb_holder) && !NIL_P(obj))
++                G_REMOVE_RELATIVE(obj, id_closures, rclosure->rb_holder);
++        }
++
+         rclosure_unref(rclosure);
+     }
+ }
+@@ -178,7 +184,13 @@
+ static void
+ gr_closure_holder_free(GRClosure *rclosure)
+ {
+-    rclosure_invalidate(NULL, (GClosure*)rclosure);
++    if (rclosure->count > 0) {
++        rclosure->count = 1;
++
++        /* No need to remove us from the relatives hash of our objects, as
++         * those aren't alive anymore anyway */
++        rclosure_unref(rclosure);
++    }
+ }
+ 
+ GClosure*
+diff -Nru ruby-gnome2-0.17.0~rc1-from-archive/glib/src/rbgobject.h ruby-gnome2-0.17.0~rc1/glib/src/rbgobject.h
+--- ruby-gnome2-0.17.0~rc1-from-archive/glib/src/rbgobject.h	2008-08-21 21:15:03.000000000 -0300
++++ ruby-gnome2-0.17.0~rc1/glib/src/rbgobject.h	2008-08-21 21:15:16.000000000 -0300
+@@ -76,6 +76,7 @@
+ 
+ #define CLASS2CINFO(klass) (rbgobj_lookup_class(klass))
+ #define GTYPE2CINFO(gtype) (rbgobj_lookup_class_by_gtype(gtype, Qnil))
++#define GTYPE2CINFO_NO_CREATE(gtype) (rbgobj_lookup_class_by_gtype_full(gtype, Qnil, FALSE))
+ #define RVAL2CINFO(obj)    (rbgobj_lookup_class(CLASS_OF(obj)))
+ #define GTYPE2CLASS(gtype) (rbgobj_gtype_to_ruby_class(gtype))
+ #define CLASS2GTYPE(klass) (rbgobj_lookup_class(klass)->gtype)
+@@ -150,8 +151,11 @@
+ 
+ 
+ /* rbgobj_type.c */
+-extern const RGObjClassInfo* rbgobj_lookup_class(VALUE klass);
+-extern const RGObjClassInfo* rbgobj_lookup_class_by_gtype(GType gtype, VALUE parent);
++extern const RGObjClassInfo *rbgobj_lookup_class(VALUE klass);
++extern const RGObjClassInfo *rbgobj_lookup_class_by_gtype(GType gtype, VALUE parent);
++extern const RGObjClassInfo *rbgobj_lookup_class_by_gtype_full(GType gtype,
++							       VALUE parent,
++							       gboolean create_object);
+ extern VALUE rbgobj_gtype_to_ruby_class(GType gtype);
+ extern VALUE rbgobj_define_class(GType gtype, const gchar* name, VALUE module,
+                                  void* mark, void* free, VALUE parent); 
+diff -Nru ruby-gnome2-0.17.0~rc1-from-archive/glib/src/rbgobj_type.c ruby-gnome2-0.17.0~rc1/glib/src/rbgobj_type.c
+--- ruby-gnome2-0.17.0~rc1-from-archive/glib/src/rbgobj_type.c	2008-08-21 21:15:03.000000000 -0300
++++ ruby-gnome2-0.17.0~rc1/glib/src/rbgobj_type.c	2008-08-21 21:15:16.000000000 -0300
+@@ -39,8 +39,9 @@
+ } RGObjClassInfoDynamic;
+ 
+ typedef struct {
+-  VALUE parent;
+-  GType gtype;
++    VALUE parent;
++    GType gtype;
++    gboolean create_class;
+ } RGObjClassByGtypeData;
+ 
+ static void
+@@ -125,10 +126,14 @@
+         return (VALUE)NULL;
+ 
+     c = rb_hash_aref(gtype_to_cinfo, INT2NUM(gtype));
+-    if (!NIL_P(c)){
++    if (!NIL_P(c)) {
+         Data_Get_Struct(c, RGObjClassInfo, cinfo);
+         return (VALUE)cinfo;
+     }
++
++    if (!cdata->create_class)
++	return (VALUE)NULL;
++
+     c = Data_Make_Struct(rb_cData, RGObjClassInfo, cinfo_mark, NULL, cinfo);
+     cinfo->gtype = gtype;
+     cinfo->mark  = NULL;
+@@ -230,8 +235,19 @@
+ const RGObjClassInfo *
+ rbgobj_lookup_class_by_gtype(GType gtype, VALUE parent)
+ {
++    return rbgobj_lookup_class_by_gtype_full(gtype, parent, TRUE);
++}
++
++const RGObjClassInfo *
++rbgobj_lookup_class_by_gtype_full(GType gtype, VALUE parent,
++				  gboolean create_class)
++{
+     VALUE critical = rb_thread_critical;
+-    RGObjClassByGtypeData data = { .parent = parent, .gtype = gtype };
++    RGObjClassByGtypeData data;
++
++    data.gtype = gtype;
++    data.parent = parent;
++    data.create_class = create_class;
+ 
+     rb_thread_critical = 1;
+ 
+diff -Nru ruby-gnome2-0.17.0~rc1-from-archive/glib/src/rbgobj_typeinstance.c ruby-gnome2-0.17.0~rc1/glib/src/rbgobj_typeinstance.c
+--- ruby-gnome2-0.17.0~rc1-from-archive/glib/src/rbgobj_typeinstance.c	2008-08-21 21:15:03.000000000 -0300
++++ ruby-gnome2-0.17.0~rc1/glib/src/rbgobj_typeinstance.c	2008-08-21 21:15:16.000000000 -0300
+@@ -16,6 +16,10 @@
+ 
+ VALUE cInstantiatable;
+ 
++typedef void (*ClassInfoCallbackFunc) (gpointer instance,
++				       const RGObjClassInfo *class_info,
++				       gpointer user_data);
++
+ static VALUE
+ instantiatable_s_allocate(klass)
+      VALUE klass;
+@@ -40,9 +44,7 @@
+ /**********************************************************************/
+ 
+ static void
+-each_cinfo(gpointer instance,
+-           void (*func)(gpointer instance, const RGObjClassInfo* cinfo, gpointer user_data),
+-           gpointer user_data)
++each_cinfo(gpointer instance, ClassInfoCallbackFunc func, gpointer user_data)
+ {
+     const GType gtype = G_TYPE_FROM_INSTANCE(instance);
+     GType* interfaces;
+@@ -51,25 +53,35 @@
+     interfaces = g_type_interfaces(gtype, &n_interfaces);
+     {
+         guint i;
+-        for (i = 0; i < n_interfaces; i++)
+-            func(instance, GTYPE2CINFO(interfaces[i]), user_data);
++        for (i = 0; i < n_interfaces; i++) {
++	    const RGObjClassInfo *info;
++
++	    info = GTYPE2CINFO_NO_CREATE(interfaces[i]);
++	    if (info)
++		func(instance, info, user_data);
++	}
+     }
+ 
+     {
+-        GType i;
+-        for (i = gtype; i != G_TYPE_INVALID; i = g_type_parent(i))
+-            func(instance, GTYPE2CINFO(i), user_data);
++        GType type;
++        for (type = gtype; type != G_TYPE_INVALID; type = g_type_parent(type)) {
++	    const RGObjClassInfo *info;
++
++	    info = GTYPE2CINFO_NO_CREATE(type);
++	    if (info)
++		func(instance, info, user_data);
++	}
+     }
+ }
+ 
+ static void
+-call_cinfo_free(gpointer instance, const RGObjClassInfo* cinfo, gpointer user_data)
++call_cinfo_free(gpointer instance, const RGObjClassInfo *cinfo, gpointer user_data)
+ {
+     if (cinfo->free) cinfo->free(instance);
+ }
+ 
+ static void
+-call_cinfo_mark(gpointer instance, const RGObjClassInfo* cinfo, gpointer user_data)
++call_cinfo_mark(gpointer instance, const RGObjClassInfo *cinfo, gpointer user_data)
+ {
+     if (cinfo->mark) cinfo->mark(instance);
+ }

Modified: packages/ruby-gnome2/trunk/debian/patches/series
===================================================================
--- packages/ruby-gnome2/trunk/debian/patches/series	2008-08-22 00:20:55 UTC (rev 2954)
+++ packages/ruby-gnome2/trunk/debian/patches/series	2008-08-26 12:55:21 UTC (rev 2955)
@@ -5,3 +5,4 @@
 gtkmozembed-rpath.patch
 xulrunner-1.9.patch
 buildsys-abort-on-error.patch
+fix-object-allocation-during-gc-phase.patch




More information about the Pkg-ruby-extras-commits mailing list