[SCM] Debian packaging of libglib-perl branch, master, updated. debian/3%1.242-2-7-gf4e94c9

intrigeri intrigeri at boum.org
Thu May 24 07:10:48 UTC 2012


The following commit has been merged in the master branch:
commit f0339b02fd2e73cf72d135e20c03388e64bff725
Author: intrigeri <intrigeri at boum.org>
Date:   Tue May 22 14:39:40 2012 +0200

    Checkout upstream files that were erroneously different in the master branch.
    
    Looks like I slightly messed things up when downgrading to the 1.24x branch.
    Let's get back to a clean state.

diff --git a/ChangeLog.pre-git b/ChangeLog.pre-git
index 7011c14..deae8f1 100644
--- a/ChangeLog.pre-git
+++ b/ChangeLog.pre-git
@@ -1,7 +1,8 @@
 === ChangeLog discontinued ===
 
 	With the move to git, we stop maintaining a separate ChangeLog and
-	rely on proper commit messages instead.
+	rely on proper commit messages instead.  Web view of changes:
+	<http://git.gnome.org/browse/perl-Glib/>.
 
 2009-03-31  Torsten Schoenfeld  <kaffeetisch at gmx.de>
 
diff --git a/GBookmarkFile.xs b/GBookmarkFile.xs
index 0e74b88..2662b98 100644
--- a/GBookmarkFile.xs
+++ b/GBookmarkFile.xs
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 by the gtk2-perl team (see the file AUTHORS for
+ * Copyright (C) 2006,2012 by the gtk2-perl team (see the file AUTHORS for
  * the full list)
  *
  * This library is free software; you can redistribute it and/or modify it
@@ -565,8 +565,8 @@ g_bookmark_file_set_app_info (bookmark_file, uri, name, exec, count, stamp)
 
 =for apidoc __gerror__
 =signature ($exec, $count, $stamp) = $bookmark_file->get_app_info ($uri, $name)
-Gets the registration informations of $name for the bookmark for
-$uri.  See Glib::BookmarkFile::set_app_info() for more informations about
+Gets the registration information of $name for the bookmark for
+$uri.  See Glib::BookmarkFile::set_app_info() for more information about
 the returned data.
 =cut
 void
diff --git a/GKeyFile.xs b/GKeyFile.xs
index 967aad8..a881b0a 100644
--- a/GKeyFile.xs
+++ b/GKeyFile.xs
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005 by the gtk2-perl team (see the file AUTHORS for
+ * Copyright (C) 2005,2012 by the gtk2-perl team (see the file AUTHORS for
  * the full list)
  *
  * This library is free software; you can redistribute it and/or modify it
@@ -412,7 +412,7 @@ If $key is not found, it is created.
 =for apidoc Glib::KeyFile::set_string
 =arg value (gchar*)
 Sets a string value to $key inside $group_name.  The string will be escaped if
-it containes special characters.
+it contains special characters.
 If $key is not found, it is created.
 =cut
 
diff --git a/GObject.xs b/GObject.xs
index 7f3233a..adcdafe 100644
--- a/GObject.xs
+++ b/GObject.xs
@@ -1,6 +1,6 @@
 /*
- * Copyright (C) 2003-2006, 2010 by the gtk2-perl team (see the file AUTHORS for
- * the full list)
+ * Copyright (C) 2003-2006, 2010, 2012 by the gtk2-perl team (see the file
+ * AUTHORS for the full list)
  *
  * This library is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Library General Public License as published by
@@ -135,6 +135,13 @@ _gperl_find_mg (SV * sv)
 	return NULL;
 }
 
+/* copied from ppport.h, needed for older perls (< 5.8.8?) */
+#ifndef SvMAGIC_set
+#  define SvMAGIC_set(sv, val)           \
+                STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
+                (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
+#endif
+
 /*
  * Remove the association between a pointer attached to C<sv> using
  * C<_gperl_attach_mg> and the C<sv>.
@@ -776,8 +783,11 @@ gobject_destroy_wrapper (SV *obj)
 {
 	GPERL_SET_CONTEXT;
 
-	if (PL_in_clean_objs)
-        	return;
+	/* As of perl 5.16, this function needs to run even during global
+	 * destruction (i.e. when PL_in_clean_objs is true) since we might
+	 * otherwise end up with undead HVs hanging on to garbage.  Prior to
+	 * 5.16, this did not matter, but recent versions of perl will find
+	 * these HVs and call DESTROY on them. */
 
 #ifdef NOISY
         warn ("gobject_destroy_wrapper (%p)[%d]\n", obj,
@@ -1206,10 +1216,12 @@ BOOT:
 
 void
 DESTROY (SV *sv)
+    PREINIT:
+        GObject *object;
+        gboolean was_undead;
     CODE:
-	GObject *object = gperl_get_object (sv);
-
-        if (!object) /* Happens on object destruction. */
+        object = gperl_get_object (sv);
+        if (!object) /* Happens on GObject destruction. */
                 return;
 #ifdef NOISY
         warn ("DESTROY< (%p)[%d] => %s (%p)[%d]\n",
@@ -1217,14 +1229,13 @@ DESTROY (SV *sv)
               gperl_object_package_from_type (G_OBJECT_TYPE (object)),
               sv, SvREFCNT (SvRV(sv)));
 #endif
+        was_undead = IS_UNDEAD (g_object_get_qdata (object, wrapper_quark));
         /* gobject object still exists, so take back the refcount we lend it. */
         /* this operation does NOT change the refcount of the combined object. */
-
 	if (PL_in_clean_objs) {
                 /* be careful during global destruction. basically,
                  * don't bother, since refcounting is no longer meaningful. */
                 _gperl_remove_mg (SvRV (sv));
-
                 g_object_steal_qdata (object, wrapper_quark);
         } else {
                 SvREFCNT_inc (SvRV (sv));
@@ -1256,7 +1267,17 @@ DESTROY (SV *sv)
 		G_UNLOCK (perl_gobjects);
 	}
 #endif
-        g_object_unref (object);
+        /* As of perl 5.16, even HVs that are not referenced by any SV will get
+         * their DESTROY called during global destruction.  Such HVs can occur
+         * when the GObject outlives the HV, as for GtkWindow or GdkScreen.
+         * Here in DESTROY such an HV will be in the "undead" state and will
+         * not own a reference to the GObject anymore.  Thus we need to avoid
+         * calling unref in this case.  See
+         * <https://rt.perl.org/rt3//Public/Bug/Display.html?id=36347> for the
+         * perl change. */
+        if (!was_undead) {
+                g_object_unref (object);
+        }
 #ifdef NOISY
 	warn ("DESTROY> (%p) done\n", object);
 	/*
@@ -1699,7 +1720,7 @@ get_pointer (object)
 =for apidoc
 =for arg all if FALSE (or omitted) tie only properties for this object's class, if TRUE tie the properties of this and all parent classes.
 
-A special method avaiable to Glib::Object derivatives, it uses perl's tie
+A special method available to Glib::Object derivatives, it uses perl's tie
 facilities to associate hash keys with the properties of the object. For
 example:
 
diff --git a/GSignal.xs b/GSignal.xs
index 3fd8376..c3ed3aa 100644
--- a/GSignal.xs
+++ b/GSignal.xs
@@ -1,6 +1,6 @@
 /*
- * Copyright (C) 2003-2004, 2009 by the gtk2-perl team (see the file AUTHORS
- * for the full list)
+ * Copyright (C) 2003-2004, 2009, 2012 by the gtk2-perl team (see the file
+ * AUTHORS for the full list)
  *
  * This library is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Library General Public License as published by
@@ -522,7 +522,36 @@ gperl_signal_emission_hook (GSignalInvocationHint * ihint,
 =cut
 
 
-MODULE = Glib::Signal	PACKAGE = Glib::Object	PREFIX = g_
+MODULE = Glib::Signal	PACKAGE = Glib::Signal
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+This page describes some functions related to signals in Glib.  Since most
+things you can do with signals are tied to L<Glib::Object> instances, the
+majority of the signal functions are documented there.
+
+=head2 Thread safety
+
+Some libraries, most notably GStreamer, sometimes invoke signal handlers from a
+foreign thread that has no Perl interpreter associated with it.  When this
+happens, we have no choice but to hand the marshalling over to the main loop
+which in turn later wakes up the main thread and lets it handle the request.
+We cannot invoke the signal handler from the foreign thread since the Perl
+interpreter may not be used concurrently.
+
+The downside to this approach is that the foreign thread is blocked until the
+main thread has finished executing the signal handler.  This might lead to
+deadlocks.  It might help in this case to wrap the crucial parts of the signal
+handler inside a L<Glib::Idle> callback so that the signal handler can return
+directly.
+
+=cut
+
+=for see_also Glib::Object
+
+=cut
 
 BOOT:
 	gperl_register_fundamental (gperl_signal_flags_get_type (),
@@ -534,6 +563,9 @@ BOOT:
 
 =cut
 
+
+MODULE = Glib::Signal	PACKAGE = Glib::Object	PREFIX = g_
+
 ##
 ##/* --- typedefs --- */
 ##typedef struct _GSignalQuery		 GSignalQuery;
diff --git a/Makefile.PL b/Makefile.PL
index 2bbf4b5..553bc1a 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -191,7 +191,6 @@ WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
 __EOW__
 
-=cut
 
 =frozen
 
diff --git a/gperl_marshal.h b/gperl_marshal.h
index a82b2a3..23af292 100644
--- a/gperl_marshal.h
+++ b/gperl_marshal.h
@@ -70,7 +70,7 @@ A typical marshaller skeleton will look like this:
 =item dGPERL_CLOSURE_MARSHAL_ARGS
 
 Declare several stack variables that the various GPERL_CLOSURE_MARSHAL macros
-will need.  Does C<dSP> for you.  This must go near the top of your C
+will need.  Declares C<SV ** sp> for you.  This must go near the top of your C
 function, before any code statements.
 
 =cut
@@ -80,7 +80,7 @@ function, before any code statements.
 	int count;		\
 	SV * data;		\
 	SV * instance;		\
-	dSP;
+	SV ** sp;
 
 /*
 =item GPERL_CLOSURE_MARSHAL_INIT (closure, marshal_data)
@@ -106,6 +106,7 @@ statement also initalizes C<pc> (the perl closure object) on the stack.
 
 # define GPERL_CLOSURE_MARSHAL_INIT(closure, marshal_data)	\
 	PERL_UNUSED_VAR (marshal_data);				\
+	SPAGAIN;						\
 	pc = (GPerlClosure *) closure;
 
 #endif
diff --git a/lib/Glib/GenPod.pm b/lib/Glib/GenPod.pm
index f5f8110..0fd7cf7 100644
--- a/lib/Glib/GenPod.pm
+++ b/lib/Glib/GenPod.pm
@@ -1216,7 +1216,7 @@ sub convert_type {
 	              \s*$/x;				# trailing space
 	my $ctype   = $1 || '!!';
 	if ($ctype eq '!!') {
-		warn "Glib::GenPod: Unable to parse type `$typestr´";
+		warn "Glib::GenPod: Unable to parse type '$typestr'";
 	}
 
 	# variant type
@@ -1539,10 +1539,10 @@ mcfarland hacked this module together via irc and email over the next few days.
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2003-2004, 2010, 2011 by the gtk2-perl team
+Copyright (C) 2003-2004, 2010-2012 by the gtk2-perl team
 
 This library is free software; you can redistribute it and/or modify
-it under the terms of the Lesser General Public License (LGPL).  For 
+it under the terms of the Lesser General Public License (LGPL).  For
 more information, see http://www.fsf.org/licenses/lgpl.txt
 
 =cut
diff --git a/lib/Glib/MakeHelper.pm b/lib/Glib/MakeHelper.pm
index 3e91a56..f6d7f44 100644
--- a/lib/Glib/MakeHelper.pm
+++ b/lib/Glib/MakeHelper.pm
@@ -228,7 +228,7 @@ There is a special Makefile variable POD_DEPENDS that should be set to the
 list of files that need to be created before the doc.pl step is run, include
 files.
 
-There is also a variable BLIB_DONE which should be used as a dependancy
+There is also a variable BLIB_DONE which should be used as a dependency
 anywhere a rule needs to be sure that a loadable and working module resides in
 the blib directory before running.
 
@@ -610,7 +610,7 @@ hacked up and documented by muppet.
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2003-2004 by the gtk2-perl team
+Copyright 2003-2004, 2012 by the gtk2-perl team
 
 This library is free software; you can redistribute it and/or modify
 it under the terms of the Lesser General Public License (LGPL).  For 

-- 
Debian packaging of libglib-perl



More information about the Pkg-perl-cvs-commits mailing list