Hello community, here is the log from the commit of package perl-Glib for openSUSE:Factory checked in at 2013-12-10 17:44:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Glib (Old) and /work/SRC/openSUSE:Factory/.perl-Glib.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Glib" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Glib/perl-Glib.changes 2013-10-06 14:53:29.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Glib.new/perl-Glib.changes 2013-12-10 17:44:26.000000000 +0100 @@ -1,0 +2,10 @@ +Mon Dec 9 11:17:41 UTC 2013 - [email protected] + +- updated to 1.303 + * Revert the change to ref counting of initial wrappers of custom subclasses, + introduced in Glib 1.300. It caused issues with subclasses inheriting from + Glib::InitiallyUnowned. + * Fix a test failure with perl >= 5.19.4. + * Create a GType for GSpawnFlags and register it with the bindings. + +------------------------------------------------------------------- Old: ---- Glib-1.302.tar.gz New: ---- Glib-1.303.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Glib.spec ++++++ --- /var/tmp/diff_new_pack.qOM4sn/_old 2013-12-10 17:44:27.000000000 +0100 +++ /var/tmp/diff_new_pack.qOM4sn/_new 2013-12-10 17:44:27.000000000 +0100 @@ -17,7 +17,7 @@ Name: perl-Glib -Version: 1.302 +Version: 1.303 Release: 0 %define cpan_name Glib Summary: Perl wrappers for the GLib utility and Object libraries ++++++ Glib-1.302.tar.gz -> Glib-1.303.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/GClosure.xs new/Glib-1.303/GClosure.xs --- old/Glib-1.302/GClosure.xs 2012-12-07 23:45:19.000000000 +0100 +++ new/Glib-1.303/GClosure.xs 2013-12-09 00:17:36.000000000 +0100 @@ -1,6 +1,6 @@ /* - * Copyright (C) 2003-2009, 2012 by the gtk2-perl team (see the file AUTHORS - * for the full list) + * Copyright (C) 2003-2009, 2012-2013 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 @@ -189,6 +189,7 @@ gpointer marshal_data) { MarshallerArgs args; + args.closure = closure; args.return_value = return_value; args.n_param_values = n_param_values; @@ -198,16 +199,32 @@ /* We need to wait for the other thread to finish marshalling to avoid * gperl_closure_marshal returning prematurely. */ +#if GLIB_CHECK_VERSION (2, 32, 0) + /* FIXME: we should put these on the stack, but it gets real ugly real fast */ + args.done_cond = g_slice_new (GCond); + g_cond_init (args.done_cond); + args.done_mutex = g_slice_new (GMutex); + g_mutex_init (args.done_mutex); +#else args.done_cond = g_cond_new (); args.done_mutex = g_mutex_new (); +#endif /* 2.32 */ + g_mutex_lock (args.done_mutex); /* FIXME: Should we use a higher priority? */ g_idle_add (_closure_remarshal, &args); g_cond_wait (args.done_cond, args.done_mutex); g_mutex_unlock (args.done_mutex); +#if GLIB_CHECK_VERSION (2, 32, 0) + g_cond_clear (args.done_cond); + g_slice_free (GCond, args.done_cond); + g_mutex_clear (args.done_mutex); + g_slice_free (GMutex, args.done_mutex); +#else g_cond_free (args.done_cond); g_mutex_free (args.done_mutex); +#endif /* 2.32 */ } =item GClosure * gperl_closure_new (SV * callback, SV * data, gboolean swap) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/GKeyFile.xs new/Glib-1.303/GKeyFile.xs --- old/Glib-1.302/GKeyFile.xs 2013-02-05 00:47:20.000000000 +0100 +++ new/Glib-1.303/GKeyFile.xs 2013-12-08 20:27:50.000000000 +0100 @@ -19,42 +19,18 @@ */ #include "gperl.h" - -#ifndef G_TYPE_KEY_FILE_FLAGS -#define G_TYPE_KEY_FILE_FLAGS gperl_g_key_file_flags_get_type() -static GType gperl_g_key_file_flags_get_type (void) G_GNUC_CONST; - -static const GFlagsValue _gperl_g_key_file_flags_values[] = { - { G_KEY_FILE_NONE, "G_KEY_FILE_NONE", "none" }, - { G_KEY_FILE_KEEP_COMMENTS, "G_KEY_FILE_KEEP_COMMENTS", "keep-comments" }, - { G_KEY_FILE_KEEP_TRANSLATIONS, "G_KEY_FILE_KEEP_TRANSLATIONS", "keep-translations" }, - { 0, NULL, NULL } -}; - -static GType -gperl_g_key_file_flags_get_type () -{ - static GType type = 0; - - if (! type) - type = g_flags_register_static ("GKeyFileFlags", - _gperl_g_key_file_flags_values); - - return type; -} - -#endif +#include "gperl-gtypes.h" SV * newSVGKeyFileFlags (GKeyFileFlags flags) { - return gperl_convert_back_flags (G_TYPE_KEY_FILE_FLAGS, flags); + return gperl_convert_back_flags (GPERL_TYPE_KEY_FILE_FLAGS, flags); } GKeyFileFlags SvGKeyFileFlags (SV * sv) { - return gperl_convert_flags (G_TYPE_KEY_FILE_FLAGS, sv); + return gperl_convert_flags (GPERL_TYPE_KEY_FILE_FLAGS, sv); } SV * @@ -133,7 +109,7 @@ =cut BOOT: - gperl_register_fundamental (gperl_g_key_file_flags_get_type (), + gperl_register_fundamental (GPERL_TYPE_KEY_FILE_FLAGS, "Glib::KeyFileFlags"); void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/GLog.xs new/Glib-1.303/GLog.xs --- old/Glib-1.302/GLog.xs 2013-02-05 00:47:20.000000000 +0100 +++ new/Glib-1.303/GLog.xs 2013-12-08 20:27:50.000000000 +0100 @@ -20,6 +20,7 @@ */ #include "gperl.h" +#include "gperl-gtypes.h" #include "gperl-private.h" /* for GPERL_SET_CONTEXT */ =head2 GLog @@ -48,41 +49,16 @@ #define G_LOG_FATAL_MASK (G_LOG_FLAG_RECURSION | G_LOG_LEVEL_ERROR) #endif -GType -g_log_level_flags_get_type (void) -{ - static GType etype = 0; - if ( etype == 0 ) { - static const GFlagsValue values[] = { - { G_LOG_FLAG_RECURSION, "G_LOG_FLAG_RECURSION", "recursion" }, - { G_LOG_FLAG_FATAL, "G_LOG_FLAG_FATAL", "fatal" }, - - { G_LOG_LEVEL_ERROR, "G_LOG_LEVEL_ERROR", "error" }, - { G_LOG_LEVEL_CRITICAL, "G_LOG_LEVEL_CRITICAL", "critical" }, - { G_LOG_LEVEL_WARNING, "G_LOG_LEVEL_WARNING", "warning" }, - { G_LOG_LEVEL_MESSAGE, "G_LOG_LEVEL_MESSAGE", "message" }, - { G_LOG_LEVEL_INFO, "G_LOG_LEVEL_INFO", "info" }, - { G_LOG_LEVEL_DEBUG, "G_LOG_LEVEL_DEBUG", "debug" }, - - { G_LOG_FATAL_MASK, "G_LOG_FATAL_MASK", "fatal-mask" }, - - { 0, NULL, NULL } - }; - etype = g_flags_register_static ("GLogLevelFlags", values); - } - return etype; -} - SV * newSVGLogLevelFlags (GLogLevelFlags flags) { - return gperl_convert_back_flags (g_log_level_flags_get_type (), flags); + return gperl_convert_back_flags (GPERL_TYPE_LOG_LEVEL_FLAGS, flags); } GLogLevelFlags SvGLogLevelFlags (SV * sv) { - return gperl_convert_flags (g_log_level_flags_get_type (), sv); + return gperl_convert_flags (GPERL_TYPE_LOG_LEVEL_FLAGS, sv); } /* for GLogFunc style, to be invoked by gperl_log_func() below */ @@ -91,7 +67,7 @@ { GType param_types[3]; param_types[0] = G_TYPE_STRING; - param_types[1] = g_log_level_flags_get_type (); + param_types[1] = GPERL_TYPE_LOG_LEVEL_FLAGS; param_types[2] = G_TYPE_STRING; return gperl_callback_new (log_func, user_data, 3, param_types, G_TYPE_NONE); @@ -191,7 +167,7 @@ /* gperl_handle_logs_for ("main"); */ gperl_handle_logs_for ("GLib"); gperl_handle_logs_for ("GLib-GObject"); - gperl_register_fundamental (g_log_level_flags_get_type (), + gperl_register_fundamental (GPERL_TYPE_LOG_LEVEL_FLAGS, "Glib::LogLevelFlags"); =for flags Glib::LogLevelFlags diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/GObject.xs new/Glib-1.303/GObject.xs --- old/Glib-1.302/GObject.xs 2012-07-09 02:11:42.000000000 +0200 +++ new/Glib-1.303/GObject.xs 2013-12-09 00:18:05.000000000 +0100 @@ -1,6 +1,6 @@ /* - * Copyright (C) 2003-2006, 2010, 2012 by the gtk2-perl team (see the file - * AUTHORS for the full list) + * Copyright (C) 2003-2006, 2010, 2012-2013 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 @@ -287,7 +287,7 @@ av_push (new_isa, newSVpv (package, 0)); else - warn ("interface type %s(%d) is not" + warn ("interface type %s(%"G_GSIZE_FORMAT") is not" " registered", g_type_name (interfaces[i]), interfaces[i]); @@ -1123,7 +1123,8 @@ { PERL_UNUSED_VAR (user_data); g_object_ref (key); - g_hash_table_replace (perl_gobjects, key, (gpointer)++value); + value += 1; + g_hash_table_replace (perl_gobjects, key, GINT_TO_POINTER (value)); } #endif @@ -1251,13 +1252,13 @@ { gint count; G_LOCK (perl_gobjects); - count = (int)g_hash_table_lookup (perl_gobjects, object); + count = GPOINTER_TO_INT (g_hash_table_lookup (perl_gobjects, object)); count--; if (count > 0) { /*g_printerr ("decing: %p - %d\n", object, count);*/ g_hash_table_replace (perl_gobjects, object, - (gpointer)count); + GINT_TO_POINTER (count)); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/GOption.xs new/Glib-1.303/GOption.xs --- old/Glib-1.302/GOption.xs 2013-09-29 08:01:08.000000000 +0200 +++ new/Glib-1.303/GOption.xs 2013-12-08 20:27:50.000000000 +0100 @@ -7,6 +7,7 @@ */ #include "gperl.h" +#include "gperl-gtypes.h" /* ------------------------------------------------------------------------- */ @@ -75,30 +76,6 @@ /* ------------------------------------------------------------------------- */ -#define GPERL_TYPE_OPTION_FLAGS (g_option_flags_get_type ()) - -static GType -g_option_flags_get_type (void) -{ - static GType t = 0; - if (t == 0) { - static const GFlagsValue values[] = { - {G_OPTION_FLAG_HIDDEN, "G_OPTION_FLAG_HIDDEN", "hidden"}, - {G_OPTION_FLAG_IN_MAIN, "G_OPTION_FLAG_IN_MAIN", "in-main"}, - {G_OPTION_FLAG_REVERSE, "G_OPTION_FLAG_REVERSE", "reverse"}, -#if GLIB_CHECK_VERSION (2, 8, 0) - {G_OPTION_FLAG_NO_ARG, "G_OPTION_FLAG_NO_ARG", "no-arg"}, - {G_OPTION_FLAG_FILENAME, "G_OPTION_FLAG_FILENAME", "filename"}, - {G_OPTION_FLAG_OPTIONAL_ARG, "G_OPTION_FLAG_OPTIONAL_ARG", "optional-arg"}, - {G_OPTION_FLAG_NOALIAS, "G_OPTION_FLAG_NOALIAS", "noalias"}, -#endif - {0, NULL, NULL} - }; - t = g_flags_register_static ("GOptionFlags", values); - } - return t; -} - #if 0 static SV * newSVGOptionFlags (GOptionFlags flags) @@ -115,33 +92,6 @@ /* ------------------------------------------------------------------------- */ -#define GPERL_TYPE_OPTION_ARG (g_option_arg_get_type ()) - -static GType -g_option_arg_get_type (void) -{ - static GType t = 0; - if (t == 0) { - static const GEnumValue values[] = { - {G_OPTION_ARG_NONE, "G_OPTION_ARG_NONE", "none"}, - {G_OPTION_ARG_STRING, "G_OPTION_ARG_STRING", "string"}, - {G_OPTION_ARG_INT, "G_OPTION_ARG_INT", "int"}, - /* Not supported: - {G_OPTION_ARG_CALLBACK, "G_OPTION_ARG_CALLBACK", "callback"}, */ - {G_OPTION_ARG_FILENAME, "G_OPTION_ARG_FILENAME", "filename"}, - {G_OPTION_ARG_STRING_ARRAY, "G_OPTION_ARG_STRING_ARRAY", "string-array"}, - {G_OPTION_ARG_FILENAME_ARRAY, "G_OPTION_ARG_FILENAME_ARRAY", "filename-array"}, -#if GLIB_CHECK_VERSION (2, 12, 0) - {G_OPTION_ARG_DOUBLE, "G_OPTION_ARG_DOUBLE", "double"}, - {G_OPTION_ARG_INT64, "G_OPTION_ARG_INT64", "int64"}, -#endif - {0, NULL, NULL} - }; - t = g_enum_register_static ("GOptionArg", values); - } - return t; -} - #if 0 static SV * newSVGOptionArg (GOptionArg arg) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/GParamSpec.xs new/Glib-1.303/GParamSpec.xs --- old/Glib-1.302/GParamSpec.xs 2012-07-09 02:11:42.000000000 +0200 +++ new/Glib-1.303/GParamSpec.xs 2013-12-08 20:27:50.000000000 +0100 @@ -20,45 +20,19 @@ */ #include "gperl.h" +#include "gperl-gtypes.h" #include "gperl-private.h" /* for _gperl_sv_from_value_internal() */ -/* - * this isn't already done for us. :-( - * - * interestingly, the obvious G_TYPE_PARAM_FLAGS is taken by the - * GParamSpecFlags. - */ - -static GType -g_param_flags_get_type (void) -{ - static GType etype = 0; - if (etype == 0) { - static const GFlagsValue values[] = { - {G_PARAM_READABLE, "G_PARAM_READABLE", "readable"}, - {G_PARAM_WRITABLE, "G_PARAM_WRITABLE", "writable"}, - {G_PARAM_CONSTRUCT, "G_PARAM_CONSTRUCT", "construct"}, - {G_PARAM_CONSTRUCT_ONLY, "G_PARAM_CONSTRUCT_ONLY", "construct-only"}, - {G_PARAM_LAX_VALIDATION, "G_PARAM_LAX_VALIDATION", "lax-validation"}, - {G_PARAM_PRIVATE, "G_PARAM_PRIVATE", "private"}, - {0, NULL, NULL} - }; - etype = g_flags_register_static ("GPerlParamFlags", values); - } - return etype; -} - - SV * newSVGParamFlags (GParamFlags flags) { - return gperl_convert_back_flags (g_param_flags_get_type (), flags); + return gperl_convert_back_flags (GPERL_TYPE_PARAM_FLAGS, flags); } GParamFlags SvGParamFlags (SV * sv) { - return gperl_convert_flags (g_param_flags_get_type (), sv); + return gperl_convert_flags (GPERL_TYPE_PARAM_FLAGS, sv); } static GHashTable * param_package_by_type = NULL; @@ -240,8 +214,7 @@ =cut BOOT: - gperl_register_fundamental (g_param_flags_get_type (), - "Glib::ParamFlags"); + gperl_register_fundamental (GPERL_TYPE_PARAM_FLAGS, "Glib::ParamFlags"); gperl_register_param_spec (G_TYPE_PARAM_CHAR, "Glib::Param::Char"); gperl_register_param_spec (G_TYPE_PARAM_UCHAR, "Glib::Param::UChar"); gperl_register_param_spec (G_TYPE_PARAM_UNICHAR, "Glib::Param::Unichar"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/GSignal.xs new/Glib-1.303/GSignal.xs --- old/Glib-1.302/GSignal.xs 2012-12-07 23:45:19.000000000 +0100 +++ new/Glib-1.303/GSignal.xs 2013-12-09 00:18:23.000000000 +0100 @@ -1,6 +1,6 @@ /* - * Copyright (C) 2003-2004, 2009, 2012 by the gtk2-perl team (see the file - * AUTHORS for the full list) + * Copyright (C) 2003-2004, 2009, 2012-2013 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 @@ -28,6 +28,7 @@ /* #define NOISY */ #include "gperl.h" +#include "gperl-gtypes.h" #include "gperl-private.h" /* for SAVED_STACK_SV */ /* @@ -36,12 +37,19 @@ * modifying it. */ #ifdef G_THREADS_ENABLED -# define GPERL_REC_LOCK_DEFINE_STATIC(name) \ +# if GLIB_CHECK_VERSION (2, 32, 0) +# define GPERL_REC_LOCK_DEFINE_STATIC(name) static GPERL_REC_LOCK_DEFINE (name) +# define GPERL_REC_LOCK_DEFINE(name) GRecMutex G_LOCK_NAME (name) +# define GPERL_REC_LOCK(name) g_rec_mutex_lock (&G_LOCK_NAME (name)) +# define GPERL_REC_UNLOCK(name) g_rec_mutex_unlock (&G_LOCK_NAME (name)) +# else +# define GPERL_REC_LOCK_DEFINE_STATIC(name) \ GStaticRecMutex G_LOCK_NAME (name) = G_STATIC_REC_MUTEX_INIT -# define GPERL_REC_LOCK(name) \ +# define GPERL_REC_LOCK(name) \ g_static_rec_mutex_lock (&G_LOCK_NAME (name)) -# define GPERL_REC_UNLOCK(name) \ +# define GPERL_REC_UNLOCK(name) \ g_static_rec_mutex_unlock (&G_LOCK_NAME (name)) +# endif #else # define GPERL_REC_LOCK_DEFINE_STATIC(name) extern void glib_dummy_decl (void) # define GPERL_REC_LOCK(name) @@ -49,59 +57,18 @@ #endif -/* -GLib doesn't include a GFlags type for GSignalFlags, so we have to do -this by hand. watch for fallen cruft. -*/ - -static GType -gperl_signal_flags_get_type (void) -{ - static GType etype = 0; - if ( etype == 0 ) { - static const GFlagsValue values[] = { - { G_SIGNAL_RUN_FIRST, "G_SIGNAL_RUN_FIRST", "run-first" }, - { G_SIGNAL_RUN_LAST, "G_SIGNAL_RUN_LAST", "run-last" }, - { G_SIGNAL_RUN_CLEANUP, "G_SIGNAL_RUN_CLEANUP", "run-cleanup" }, - { G_SIGNAL_NO_RECURSE, "G_SIGNAL_NO_RECURSE", "no-recurse" }, - { G_SIGNAL_DETAILED, "G_SIGNAL_DETAILED", "detailed" }, - { G_SIGNAL_ACTION, "G_SIGNAL_ACTION", "action" }, - { G_SIGNAL_NO_HOOKS, "G_SIGNAL_NO_HOOKS", "no-hooks" }, - { 0, NULL, NULL } - }; - etype = g_flags_register_static ("GSignalFlags", values); - } - return etype; -} - SV * newSVGSignalFlags (GSignalFlags flags) { - return gperl_convert_back_flags (gperl_signal_flags_get_type (), flags); + return gperl_convert_back_flags (GPERL_TYPE_SIGNAL_FLAGS, flags); } GSignalFlags SvGSignalFlags (SV * sv) { - return gperl_convert_flags (gperl_signal_flags_get_type (), sv); + return gperl_convert_flags (GPERL_TYPE_SIGNAL_FLAGS, sv); } -/* GConnectFlags doesn't come with a GType either. We don't use it in Glib - * directly, but other bindings might need it. */ -static GType -gperl_connect_flags_get_type (void) -{ - static GType etype = 0; - if ( etype == 0 ) { - static const GFlagsValue values[] = { - { G_CONNECT_AFTER, "G_CONNECT_AFTER", "after" }, - { G_CONNECT_SWAPPED, "G_CONNECT_SWAPPED", "swapped" }, - { 0, NULL, NULL } - }; - etype = g_flags_register_static ("GConnectFlags", values); - } - return etype; -} SV * newSVGSignalInvocationHint (GSignalInvocationHint * ihint) @@ -578,9 +545,9 @@ =cut BOOT: - gperl_register_fundamental (gperl_signal_flags_get_type (), + gperl_register_fundamental (GPERL_TYPE_SIGNAL_FLAGS, "Glib::SignalFlags"); - gperl_register_fundamental (gperl_connect_flags_get_type (), + gperl_register_fundamental (GPERL_TYPE_CONNECT_FLAGS, "Glib::ConnectFlags"); =for flags Glib::SignalFlags diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/GType.xs new/Glib-1.303/GType.xs --- old/Glib-1.302/GType.xs 2013-09-29 08:01:35.000000000 +0200 +++ new/Glib-1.303/GType.xs 2013-12-08 20:27:50.000000000 +0100 @@ -28,6 +28,7 @@ #include "gperl.h" #include "gperl_marshal.h" +#include "gperl-gtypes.h" #include "gperl-private.h" /* for _gperl_fetch_wrapper_key */ /* for fundamental types */ @@ -1104,9 +1105,8 @@ if (SvTRUE (ERRSV)) { warn ("### WOAH! unhandled exception in a signal accumulator!\n" "### this is really uncool, and for now i'm not even going to\n" - "### try to recover.\n" - "### aborting"); - abort (); + "### try to recover."); + croak (Nullch); } if (n != 2) { @@ -1118,10 +1118,9 @@ "### your sub returned %d value%s\n" "###\n" "### there's no resonable way to recover from this.\n" - "### you must fix this code.\n" - "### aborting", + "### you must fix this code", n, n==1?"":"s"); - abort (); + croak (Nullch); } SPAGAIN; @@ -1756,8 +1755,28 @@ SV **slot; g_assert (stash != NULL); - /* this SV will be freed below either via sv_2mortal or explicitly. */ - obj = gperl_new_object (instance, FALSE); + /* we need to always create a wrapper, regardless of whether there is + * an INIT_INSTANCE sub. otherwise, the fallback mechanism in + * GType.xs' SET_PROPERTY handler will not have an HV to store the + * properties in. + * + * we also need to ensure that the wrapper we create is not immediately + * destroyed when we return from gperl_type_instance_init. otherwise, + * instances of classes derived from GInitiallyUnowned might be + * destroyed prematurely when code in INIT_INSTANCE manages to sink the + * initial, floating reference. example: in a container subclass' + * INIT_INSTANCE, adding a child and then calling the child's + * get_parent() method. so we mortalize the wrapper before the + * SAVETMPS/FREETMPS pair below. this should ensure that the wrapper + * survives long enough so that it is still intact when the call to the + * Perl constructor returns. + * + * if we always sank floating references, or if we forbade doing things + * as described in the example, we could simply free the SV before we + * return from gperl_type_instance_init. this would result in more + * predictable reference counting. */ + obj = sv_2mortal (gperl_new_object (instance, FALSE)); + /* we need to re-bless the wrapper because classes change * during construction of an object. */ sv_bless (obj, stash); @@ -1776,13 +1795,11 @@ ENTER; SAVETMPS; PUSHMARK (SP); - XPUSHs (sv_2mortal (obj)); /* mortalize the SV */ + XPUSHs (obj); PUTBACK; call_sv ((SV *)GvCV (*slot), G_VOID|G_DISCARD); FREETMPS; LEAVE; - } else { - SvREFCNT_dec (obj); /* free the SV explicitly */ } } @@ -1852,12 +1869,21 @@ * * many thanks to Brett Kosinski for devising this evil^Wclever scheme. */ +#if GLIB_CHECK_VERSION (2, 32, 0) + /* GRecMutex in static storage do not need initialization */ + static GRecMutex base_init_lock; +#else static GStaticRecMutex base_init_lock = G_STATIC_REC_MUTEX_INIT; +#endif /* 2.32 */ static GHashTable * seen = NULL; GSList * types; GType t; +#if GLIB_CHECK_VERSION (2, 32, 0) + g_rec_mutex_lock (&base_init_lock); +#else g_static_rec_mutex_lock (&base_init_lock); +#endif /* 2.32 */ if (!seen) seen = g_hash_table_new (g_direct_hash, g_direct_equal); @@ -1921,7 +1947,11 @@ } } +#if GLIB_CHECK_VERSION (2, 32, 0) + g_rec_mutex_unlock (&base_init_lock); +#else g_static_rec_mutex_unlock (&base_init_lock); +#endif /* 2.32 */ } /* make sure we close the open list to keep from freaking out pod readers... */ @@ -1979,6 +2009,9 @@ */ gperl_register_fundamental_alias (G_TYPE_UINT, "Glib::Uint"); + /* register custom GTypes that do not have a better home. */ + gperl_register_fundamental (GPERL_TYPE_SPAWN_FLAGS, "Glib::SpawnFlags"); + =for apidoc =for arg parent_class (package) type from which to derive diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/GUtils.xs new/Glib-1.303/GUtils.xs --- old/Glib-1.302/GUtils.xs 2012-01-06 07:26:40.000000000 +0100 +++ new/Glib-1.303/GUtils.xs 2013-12-08 20:27:50.000000000 +0100 @@ -20,40 +20,20 @@ * $Id$ */ #include "gperl.h" +#include "gperl-gtypes.h" #if GLIB_CHECK_VERSION (2, 14, 0) -static GType -gperl_user_directory_get_type (void) -{ - static GType etype = 0; - if (etype == 0) { - static const GEnumValue values[] = { - { G_USER_DIRECTORY_DESKTOP, "G_USER_DIRECTORY_DESKTOP", "desktop" }, - { G_USER_DIRECTORY_DOCUMENTS, "G_USER_DIRECTORY_DOCUMENTS", "documents" }, - { G_USER_DIRECTORY_DOWNLOAD, "G_USER_DIRECTORY_DOWNLOAD", "download" }, - { G_USER_DIRECTORY_MUSIC, "G_USER_DIRECTORY_MUSIC", "music" }, - { G_USER_DIRECTORY_PICTURES, "G_USER_DIRECTORY_PICTURES", "pictures" }, - { G_USER_DIRECTORY_PUBLIC_SHARE, "G_USER_DIRECTORY_PUBLIC_SHARE", "public-share" }, - { G_USER_DIRECTORY_TEMPLATES, "G_USER_DIRECTORY_TEMPLATES", "templates" }, - { G_USER_DIRECTORY_VIDEOS, "G_USER_DIRECTORY_VIDEOS", "videos" }, - { 0, NULL, NULL } - }; - etype = g_enum_register_static ("GUserDirectory", values); - } - return etype; -} - GUserDirectory SvGUserDirectory (SV *sv) { - return gperl_convert_enum (gperl_user_directory_get_type (), sv); + return gperl_convert_enum (GPERL_TYPE_USER_DIRECTORY, sv); } SV * newSVGUserDirectory (GUserDirectory dir) { - return gperl_convert_back_enum (gperl_user_directory_get_type (), dir); + return gperl_convert_back_enum (GPERL_TYPE_USER_DIRECTORY, dir); } #endif @@ -62,7 +42,7 @@ BOOT: #if GLIB_CHECK_VERSION (2, 14, 0) - gperl_register_fundamental (gperl_user_directory_get_type (), + gperl_register_fundamental (GPERL_TYPE_USER_DIRECTORY, "Glib::UserDirectory"); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/Glib.xs new/Glib-1.303/Glib.xs --- old/Glib-1.302/Glib.xs 2013-09-29 05:13:27.000000000 +0200 +++ new/Glib-1.303/Glib.xs 2013-12-08 20:27:50.000000000 +0100 @@ -436,12 +436,16 @@ MODULE = Glib PACKAGE = Glib PREFIX = g_ BOOT: -#if defined(G_THREADS_ENABLED) && !defined(GPERL_DISABLE_THREADSAFE) +#if !GLIB_CHECK_VERSION (2, 32, 0) && defined(G_THREADS_ENABLED) && !defined(GPERL_DISABLE_THREADSAFE) + /* g_thread_init() is a deprecated no-op */ /*warn ("calling g_thread_init (NULL)");*/ if (!g_thread_supported ()) g_thread_init (NULL); #endif +#if !GLIB_CHECK_VERSION (2, 36, 0) + /* g_type_init() is a deprecated no-op */ g_type_init (); +#endif _gperl_set_master_interp (PERL_GET_INTERP); #ifndef PERL_IMPLICIT_CONTEXT _gperl_fetch_main_tid (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/META.json new/Glib-1.303/META.json --- old/Glib-1.302/META.json 2013-09-29 08:12:23.000000000 +0200 +++ new/Glib-1.303/META.json 2013-12-09 00:29:29.000000000 +0100 @@ -4,7 +4,7 @@ "gtk2-perl Team <gtk-perl-list at gnome dot org>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921", + "generated_by" : "ExtUtils::MakeMaker version 6.68, CPAN::Meta::Converter version 2.131560", "license" : [ "lgpl_2_1" ], @@ -44,11 +44,22 @@ ] }, "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, "configure" : { "requires" : { "ExtUtils::Depends" : "0.300", "ExtUtils::PkgConfig" : "1.000" } + }, + "runtime" : { + "requires" : { + "ExtUtils::Depends" : "0.300", + "ExtUtils::PkgConfig" : "1.000" + } } }, "release_status" : "stable", @@ -68,5 +79,5 @@ }, "x_MailingList" : "https://mail.gnome.org/mailman/listinfo/gtk-perl-list" }, - "version" : "1.302" + "version" : "1.303" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/META.yml new/Glib-1.303/META.yml --- old/Glib-1.302/META.yml 2013-09-29 08:12:23.000000000 +0200 +++ new/Glib-1.303/META.yml 2013-12-09 00:29:28.000000000 +0100 @@ -2,12 +2,13 @@ abstract: 'Perl wrappers for the GLib utility and Object libraries' author: - 'gtk2-perl Team <gtk-perl-list at gnome dot org>' -build_requires: {} +build_requires: + ExtUtils::MakeMaker: 0 configure_requires: ExtUtils::Depends: 0.300 ExtUtils::PkgConfig: 1.000 dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921' +generated_by: 'ExtUtils::MakeMaker version 6.68, CPAN::Meta::Converter version 2.131560' license: lgpl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -39,10 +40,13 @@ - xsapi.pod.foot package: - MY +requires: + ExtUtils::Depends: 0.300 + ExtUtils::PkgConfig: 1.000 resources: + MailingList: https://mail.gnome.org/mailman/listinfo/gtk-perl-list bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Glib homepage: http://gtk2-perl.sourceforge.net license: http://www.gnu.org/licenses/lgpl-2.1.html repository: git://git.gnome.org/perl-Glib - x_MailingList: https://mail.gnome.org/mailman/listinfo/gtk-perl-list -version: 1.302 +version: 1.303 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/NEWS new/Glib-1.303/NEWS --- old/Glib-1.302/NEWS 2013-09-29 08:08:39.000000000 +0200 +++ new/Glib-1.303/NEWS 2013-12-09 00:21:25.000000000 +0100 @@ -1,3 +1,12 @@ +Overview of changes in Glib 1.303 (stable) +========================================== + +* Revert the change to ref counting of initial wrappers of custom subclasses, + introduced in Glib 1.300. It caused issues with subclasses inheriting from + Glib::InitiallyUnowned. +* Fix a test failure with perl >= 5.19.4. +* Create a GType for GSpawnFlags and register it with the bindings. + Overview of changes in Glib 1.302 (stable) ========================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/gperl-gtypes.c new/Glib-1.303/gperl-gtypes.c --- old/Glib-1.302/gperl-gtypes.c 2011-11-27 08:56:58.000000000 +0100 +++ new/Glib-1.303/gperl-gtypes.c 2013-12-08 20:27:50.000000000 +0100 @@ -2,9 +2,228 @@ * this was initially generated by glib-mkenums, but i stripped out all the * non-Error definitions, as we won't use them. */ + #include "gperl.h" -static const GEnumValue _gperl_g_convert_error_values[] = { +/* -------------------------------------------------------------------------- + * --- Enums/Flags: --------------------------------------------------------- + * -------------------------------------------------------------------------- */ + +GType +gperl_connect_flags_get_type (void) +{ + static GType etype = 0; + if ( etype == 0 ) { + static const GFlagsValue values[] = { + { G_CONNECT_AFTER, "G_CONNECT_AFTER", "after" }, + { G_CONNECT_SWAPPED, "G_CONNECT_SWAPPED", "swapped" }, + { 0, NULL, NULL } + }; + etype = g_flags_register_static ("GConnectFlags", values); + } + return etype; +} + +/* -------------------------------------------------------------------------- */ + +#if GLIB_CHECK_VERSION (2, 6, 0) +GType +gperl_key_file_flags_get_type () +{ + static GType type = 0; + if (! type) { + static const GFlagsValue values[] = { + { G_KEY_FILE_NONE, "G_KEY_FILE_NONE", "none" }, + { G_KEY_FILE_KEEP_COMMENTS, "G_KEY_FILE_KEEP_COMMENTS", "keep-comments" }, + { G_KEY_FILE_KEEP_TRANSLATIONS, "G_KEY_FILE_KEEP_TRANSLATIONS", "keep-translations" }, + { 0, NULL, NULL } + }; + type = g_flags_register_static ("GKeyFileFlags", values); + } + return type; +} +#endif + +/* -------------------------------------------------------------------------- */ + +GType +gperl_log_level_flags_get_type (void) +{ + static GType etype = 0; + if ( etype == 0 ) { + static const GFlagsValue values[] = { + { G_LOG_FLAG_RECURSION, "G_LOG_FLAG_RECURSION", "recursion" }, + { G_LOG_FLAG_FATAL, "G_LOG_FLAG_FATAL", "fatal" }, + + { G_LOG_LEVEL_ERROR, "G_LOG_LEVEL_ERROR", "error" }, + { G_LOG_LEVEL_CRITICAL, "G_LOG_LEVEL_CRITICAL", "critical" }, + { G_LOG_LEVEL_WARNING, "G_LOG_LEVEL_WARNING", "warning" }, + { G_LOG_LEVEL_MESSAGE, "G_LOG_LEVEL_MESSAGE", "message" }, + { G_LOG_LEVEL_INFO, "G_LOG_LEVEL_INFO", "info" }, + { G_LOG_LEVEL_DEBUG, "G_LOG_LEVEL_DEBUG", "debug" }, + + { G_LOG_FATAL_MASK, "G_LOG_FATAL_MASK", "fatal-mask" }, + + { 0, NULL, NULL } + }; + etype = g_flags_register_static ("GLogLevelFlags", values); + } + return etype; +} + +/* -------------------------------------------------------------------------- */ + +#if GLIB_CHECK_VERSION (2, 6, 0) +GType +gperl_option_arg_get_type (void) +{ + static GType t = 0; + if (t == 0) { + static const GEnumValue values[] = { + {G_OPTION_ARG_NONE, "G_OPTION_ARG_NONE", "none"}, + {G_OPTION_ARG_STRING, "G_OPTION_ARG_STRING", "string"}, + {G_OPTION_ARG_INT, "G_OPTION_ARG_INT", "int"}, + {G_OPTION_ARG_CALLBACK, "G_OPTION_ARG_CALLBACK", "callback"}, + {G_OPTION_ARG_FILENAME, "G_OPTION_ARG_FILENAME", "filename"}, + {G_OPTION_ARG_STRING_ARRAY, "G_OPTION_ARG_STRING_ARRAY", "string-array"}, + {G_OPTION_ARG_FILENAME_ARRAY, "G_OPTION_ARG_FILENAME_ARRAY", "filename-array"}, +#if GLIB_CHECK_VERSION (2, 12, 0) + {G_OPTION_ARG_DOUBLE, "G_OPTION_ARG_DOUBLE", "double"}, + {G_OPTION_ARG_INT64, "G_OPTION_ARG_INT64", "int64"}, +#endif + {0, NULL, NULL} + }; + t = g_enum_register_static ("GOptionArg", values); + } + return t; +} +#endif + +/* -------------------------------------------------------------------------- */ + +#if GLIB_CHECK_VERSION (2, 6, 0) +GType +gperl_option_flags_get_type (void) +{ + static GType t = 0; + if (t == 0) { + static const GFlagsValue values[] = { + {G_OPTION_FLAG_HIDDEN, "G_OPTION_FLAG_HIDDEN", "hidden"}, + {G_OPTION_FLAG_IN_MAIN, "G_OPTION_FLAG_IN_MAIN", "in-main"}, + {G_OPTION_FLAG_REVERSE, "G_OPTION_FLAG_REVERSE", "reverse"}, +#if GLIB_CHECK_VERSION (2, 8, 0) + {G_OPTION_FLAG_NO_ARG, "G_OPTION_FLAG_NO_ARG", "no-arg"}, + {G_OPTION_FLAG_FILENAME, "G_OPTION_FLAG_FILENAME", "filename"}, + {G_OPTION_FLAG_OPTIONAL_ARG, "G_OPTION_FLAG_OPTIONAL_ARG", "optional-arg"}, + {G_OPTION_FLAG_NOALIAS, "G_OPTION_FLAG_NOALIAS", "noalias"}, +#endif + {0, NULL, NULL} + }; + t = g_flags_register_static ("GOptionFlags", values); + } + return t; +} +#endif + +/* -------------------------------------------------------------------------- */ + +/* the obvious GParamFlags is taken by GParamSpecFlags. */ +GType +gperl_param_flags_get_type (void) +{ + static GType etype = 0; + if (etype == 0) { + static const GFlagsValue values[] = { + {G_PARAM_READABLE, "G_PARAM_READABLE", "readable"}, + {G_PARAM_WRITABLE, "G_PARAM_WRITABLE", "writable"}, + {G_PARAM_CONSTRUCT, "G_PARAM_CONSTRUCT", "construct"}, + {G_PARAM_CONSTRUCT_ONLY, "G_PARAM_CONSTRUCT_ONLY", "construct-only"}, + {G_PARAM_LAX_VALIDATION, "G_PARAM_LAX_VALIDATION", "lax-validation"}, + {G_PARAM_PRIVATE, "G_PARAM_PRIVATE", "private"}, + {0, NULL, NULL} + }; + etype = g_flags_register_static ("GPerlParamFlags", values); + } + return etype; +} + +/* -------------------------------------------------------------------------- */ + +GType +gperl_signal_flags_get_type (void) +{ + static GType etype = 0; + if ( etype == 0 ) { + static const GFlagsValue values[] = { + { G_SIGNAL_RUN_FIRST, "G_SIGNAL_RUN_FIRST", "run-first" }, + { G_SIGNAL_RUN_LAST, "G_SIGNAL_RUN_LAST", "run-last" }, + { G_SIGNAL_RUN_CLEANUP, "G_SIGNAL_RUN_CLEANUP", "run-cleanup" }, + { G_SIGNAL_NO_RECURSE, "G_SIGNAL_NO_RECURSE", "no-recurse" }, + { G_SIGNAL_DETAILED, "G_SIGNAL_DETAILED", "detailed" }, + { G_SIGNAL_ACTION, "G_SIGNAL_ACTION", "action" }, + { G_SIGNAL_NO_HOOKS, "G_SIGNAL_NO_HOOKS", "no-hooks" }, + { 0, NULL, NULL } + }; + etype = g_flags_register_static ("GSignalFlags", values); + } + return etype; +} + +/* -------------------------------------------------------------------------- */ + +GType +gperl_spawn_flags_get_type (void) +{ + static GType etype = 0; + if (G_UNLIKELY(etype == 0)) { + static const GFlagsValue values[] = { +#if GLIB_CHECK_VERSION (2, 38, 0) + { G_SPAWN_DEFAULT, "G_SPAWN_DEFAULT", "default" }, +#endif + { G_SPAWN_LEAVE_DESCRIPTORS_OPEN, "G_SPAWN_LEAVE_DESCRIPTORS_OPEN", "leave-descriptors-open" }, + { G_SPAWN_DO_NOT_REAP_CHILD, "G_SPAWN_DO_NOT_REAP_CHILD", "do-not-reap-child" }, + { G_SPAWN_SEARCH_PATH, "G_SPAWN_SEARCH_PATH", "search-path" }, + { G_SPAWN_STDOUT_TO_DEV_NULL, "G_SPAWN_STDOUT_TO_DEV_NULL", "stdout-to-dev-null" }, + { G_SPAWN_STDERR_TO_DEV_NULL, "G_SPAWN_STDERR_TO_DEV_NULL", "stderr-to-dev-null" }, + { G_SPAWN_CHILD_INHERITS_STDIN, "G_SPAWN_CHILD_INHERITS_STDIN", "child-inherits-stdin" }, + { G_SPAWN_FILE_AND_ARGV_ZERO, "G_SPAWN_FILE_AND_ARGV_ZERO", "file-and-argv-zero" }, + { G_SPAWN_SEARCH_PATH_FROM_ENVP, "G_SPAWN_SEARCH_PATH_FROM_ENVP", "search-path-from-envp" }, + { 0, NULL, NULL } + }; + etype = g_flags_register_static (g_intern_static_string ("GSpawnFlags"), values); + } + return etype; +} + +/* -------------------------------------------------------------------------- */ + +#if GLIB_CHECK_VERSION (2, 14, 0) +GType gperl_user_directory_get_type (void) +{ + static GType etype = 0; + if (etype == 0) { + static const GEnumValue values[] = { + { G_USER_DIRECTORY_DESKTOP, "G_USER_DIRECTORY_DESKTOP", "desktop" }, + { G_USER_DIRECTORY_DOCUMENTS, "G_USER_DIRECTORY_DOCUMENTS", "documents" }, + { G_USER_DIRECTORY_DOWNLOAD, "G_USER_DIRECTORY_DOWNLOAD", "download" }, + { G_USER_DIRECTORY_MUSIC, "G_USER_DIRECTORY_MUSIC", "music" }, + { G_USER_DIRECTORY_PICTURES, "G_USER_DIRECTORY_PICTURES", "pictures" }, + { G_USER_DIRECTORY_PUBLIC_SHARE, "G_USER_DIRECTORY_PUBLIC_SHARE", "public-share" }, + { G_USER_DIRECTORY_TEMPLATES, "G_USER_DIRECTORY_TEMPLATES", "templates" }, + { G_USER_DIRECTORY_VIDEOS, "G_USER_DIRECTORY_VIDEOS", "videos" }, + { 0, NULL, NULL } + }; + etype = g_enum_register_static ("GUserDirectory", values); + } + return etype; +} +#endif + +/* -------------------------------------------------------------------------- + * --- Error values: -------------------------------------------------------- + * -------------------------------------------------------------------------- */ + +static const GEnumValue _gperl_convert_error_values[] = { { G_CONVERT_ERROR_NO_CONVERSION, "G_CONVERT_ERROR_NO_CONVERSION", "no-conversion" }, { G_CONVERT_ERROR_ILLEGAL_SEQUENCE, "G_CONVERT_ERROR_ILLEGAL_SEQUENCE", "illegal-sequence" }, { G_CONVERT_ERROR_FAILED, "G_CONVERT_ERROR_FAILED", "failed" }, @@ -15,23 +234,19 @@ }; GType -gperl_g_convert_error_get_type (void) +gperl_convert_error_get_type (void) { static GType type = 0; if (!type) - type = g_enum_register_static ("GConvertError", _gperl_g_convert_error_values); + type = g_enum_register_static ("GConvertError", _gperl_convert_error_values); return type; } -#define GPERL_TYPE_CONVERT_ERROR gperl_g_convert_error_get_type() -GType gperl_g_convert_error_get_type (void); +/* -------------------------------------------------------------------------- */ - - - -static const GEnumValue _gperl_g_file_error_values[] = { +static const GEnumValue _gperl_file_error_values[] = { { G_FILE_ERROR_EXIST, "G_FILE_ERROR_EXIST", "exist" }, { G_FILE_ERROR_ISDIR, "G_FILE_ERROR_ISDIR", "isdir" }, { G_FILE_ERROR_ACCES, "G_FILE_ERROR_ACCES", "acces" }, @@ -60,23 +275,22 @@ }; GType -gperl_g_file_error_get_type (void) +gperl_file_error_get_type (void) { static GType type = 0; if (!type) - type = g_enum_register_static ("GFileError", _gperl_g_file_error_values); + type = g_enum_register_static ("GFileError", _gperl_file_error_values); return type; } -#define GPERL_TYPE_FILE_ERROR gperl_g_file_error_get_type() -GType gperl_g_file_error_get_type (void); - +#define GPERL_TYPE_FILE_ERROR gperl_file_error_get_type() +GType gperl_file_error_get_type (void); +/* -------------------------------------------------------------------------- */ - -static const GEnumValue _gperl_g_io_error_values[] = { +static const GEnumValue _gperl_io_error_values[] = { { G_IO_ERROR_NONE, "G_IO_ERROR_NONE", "none" }, { G_IO_ERROR_AGAIN, "G_IO_ERROR_AGAIN", "again" }, { G_IO_ERROR_INVAL, "G_IO_ERROR_INVAL", "inval" }, @@ -85,21 +299,22 @@ }; GType -gperl_g_io_error_get_type (void) +gperl_io_error_get_type (void) { static GType type = 0; if (!type) - type = g_enum_register_static ("GIOError", _gperl_g_io_error_values); + type = g_enum_register_static ("GIOError", _gperl_io_error_values); return type; } -#define GPERL_TYPE_IO_ERROR gperl_g_io_error_get_type() -GType gperl_g_io_error_get_type (void); +#define GPERL_TYPE_IO_ERROR gperl_io_error_get_type() +GType gperl_io_error_get_type (void); +/* -------------------------------------------------------------------------- */ -static const GEnumValue _gperl_g_io_channel_error_values[] = { +static const GEnumValue _gperl_io_channel_error_values[] = { { G_IO_CHANNEL_ERROR_FBIG, "G_IO_CHANNEL_ERROR_FBIG", "fbig" }, { G_IO_CHANNEL_ERROR_INVAL, "G_IO_CHANNEL_ERROR_INVAL", "inval" }, { G_IO_CHANNEL_ERROR_IO, "G_IO_CHANNEL_ERROR_IO", "io" }, @@ -113,23 +328,23 @@ }; GType -gperl_g_io_channel_error_get_type (void) +gperl_io_channel_error_get_type (void) { static GType type = 0; if (!type) - type = g_enum_register_static ("GIOChannelError", _gperl_g_io_channel_error_values); + type = g_enum_register_static ("GIOChannelError", _gperl_io_channel_error_values); return type; } -#define GPERL_TYPE_IO_CHANNEL_ERROR gperl_g_io_channel_error_get_type() -GType gperl_g_io_channel_error_get_type (void); - +#define GPERL_TYPE_IO_CHANNEL_ERROR gperl_io_channel_error_get_type() +GType gperl_io_channel_error_get_type (void); +/* -------------------------------------------------------------------------- */ #if GLIB_CHECK_VERSION (2, 6, 0) -static const GEnumValue _gperl_g_key_file_error_values[] = { +static const GEnumValue _gperl_key_file_error_values[] = { { G_KEY_FILE_ERROR_UNKNOWN_ENCODING, "G_KEY_FILE_ERROR_UNKNOWN_ENCODING", "unknwon-encoding" }, { G_KEY_FILE_ERROR_PARSE, "G_KEY_FILE_ERROR_PARSE", "parse" }, { G_KEY_FILE_ERROR_NOT_FOUND, "G_KEY_FILE_ERROR_NOT_FOUND", "not-found" }, @@ -140,24 +355,24 @@ }; GType -gperl_g_key_file_error_get_type (void) +gperl_key_file_error_get_type (void) { static GType type = 0; if (!type) - type = g_enum_register_static ("GKeyFileError", _gperl_g_key_file_error_values); + type = g_enum_register_static ("GKeyFileError", _gperl_key_file_error_values); return type; } -#define GPERL_TYPE_KEY_FILE_ERROR gperl_g_key_file_error_get_type() -GType gperl_g_key_file_error_get_type (void); +#define GPERL_TYPE_KEY_FILE_ERROR gperl_key_file_error_get_type() +GType gperl_key_file_error_get_type (void); #endif /* GLIB_CHECK_VERSION (2, 6, 0) */ - +/* -------------------------------------------------------------------------- */ #if GLIB_CHECK_VERSION (2, 12, 0) -static const GEnumValue _gperl_g_bookmark_file_error_values[] = { +static const GEnumValue _gperl_bookmark_file_error_values[] = { { G_BOOKMARK_FILE_ERROR_INVALID_URI, "G_BOOKMARK_FILE_ERROR_INVALID_URI", "invalid-uri" }, { G_BOOKMARK_FILE_ERROR_INVALID_VALUE, "G_BOOKMARK_FILE_ERROR_INVALID_VALUE", "invalid-value" }, { G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED, "G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED", "not-registered" }, @@ -170,23 +385,23 @@ }; GType -gperl_g_bookmark_file_error_get_type (void) +gperl_bookmark_file_error_get_type (void) { static GType type = 0; if (!type) - type = g_enum_register_static ("GBookmarkFileError", _gperl_g_bookmark_file_error_values); + type = g_enum_register_static ("GBookmarkFileError", _gperl_bookmark_file_error_values); return type; } -#define GPERL_TYPE_BOOKMARK_FILE_ERROR gperl_g_bookmark_file_error_get_type() -GType gperl_g_bookmark_file_error_get_type (void); +#define GPERL_TYPE_BOOKMARK_FILE_ERROR gperl_bookmark_file_error_get_type() +GType gperl_bookmark_file_error_get_type (void); #endif /* GLIB_CHECK_VERSION (2, 12, 0) */ +/* -------------------------------------------------------------------------- */ - -static const GEnumValue _gperl_g_markup_error_values[] = { +static const GEnumValue _gperl_markup_error_values[] = { { G_MARKUP_ERROR_BAD_UTF8, "G_MARKUP_ERROR_BAD_UTF8", "bad-utf8" }, { G_MARKUP_ERROR_EMPTY, "G_MARKUP_ERROR_EMPTY", "empty" }, { G_MARKUP_ERROR_PARSE, "G_MARKUP_ERROR_PARSE", "parse" }, @@ -197,22 +412,22 @@ }; GType -gperl_g_markup_error_get_type (void) +gperl_markup_error_get_type (void) { static GType type = 0; if (!type) - type = g_enum_register_static ("GMarkupError", _gperl_g_markup_error_values); + type = g_enum_register_static ("GMarkupError", _gperl_markup_error_values); return type; } -#define GPERL_TYPE_MARKUP_ERROR gperl_g_markup_error_get_type() -GType gperl_g_markup_error_get_type (void); +#define GPERL_TYPE_MARKUP_ERROR gperl_markup_error_get_type() +GType gperl_markup_error_get_type (void); +/* -------------------------------------------------------------------------- */ - -static const GEnumValue _gperl_g_shell_error_values[] = { +static const GEnumValue _gperl_shell_error_values[] = { { G_SHELL_ERROR_BAD_QUOTING, "G_SHELL_ERROR_BAD_QUOTING", "bad-quoting" }, { G_SHELL_ERROR_EMPTY_STRING, "G_SHELL_ERROR_EMPTY_STRING", "empty-string" }, { G_SHELL_ERROR_FAILED, "G_SHELL_ERROR_FAILED", "failed" }, @@ -220,21 +435,22 @@ }; GType -gperl_g_shell_error_get_type (void) +gperl_shell_error_get_type (void) { static GType type = 0; if (!type) - type = g_enum_register_static ("GShellError", _gperl_g_shell_error_values); + type = g_enum_register_static ("GShellError", _gperl_shell_error_values); return type; } -#define GPERL_TYPE_SHELL_ERROR gperl_g_shell_error_get_type() -GType gperl_g_shell_error_get_type (void); +#define GPERL_TYPE_SHELL_ERROR gperl_shell_error_get_type() +GType gperl_shell_error_get_type (void); +/* -------------------------------------------------------------------------- */ -static const GEnumValue _gperl_g_spawn_error_values[] = { +static const GEnumValue _gperl_spawn_error_values[] = { { G_SPAWN_ERROR_FORK, "G_SPAWN_ERROR_FORK", "fork" }, { G_SPAWN_ERROR_READ, "G_SPAWN_ERROR_READ", "read" }, { G_SPAWN_ERROR_CHDIR, "G_SPAWN_ERROR_CHDIR", "chdir" }, @@ -259,37 +475,36 @@ }; GType -gperl_g_spawn_error_get_type (void) +gperl_spawn_error_get_type (void) { static GType type = 0; if (!type) - type = g_enum_register_static ("GSpawnError", _gperl_g_spawn_error_values); + type = g_enum_register_static ("GSpawnError", _gperl_spawn_error_values); return type; } -#define GPERL_TYPE_SPAWN_ERROR gperl_g_spawn_error_get_type() -GType gperl_g_spawn_error_get_type (void); - +#define GPERL_TYPE_SPAWN_ERROR gperl_spawn_error_get_type() +GType gperl_spawn_error_get_type (void); +/* -------------------------------------------------------------------------- */ -static const GEnumValue _gperl_g_thread_error_values[] = { +static const GEnumValue _gperl_thread_error_values[] = { { G_THREAD_ERROR_AGAIN, "G_THREAD_ERROR_AGAIN", "again" }, { 0, NULL, NULL } }; GType -gperl_g_thread_error_get_type (void) +gperl_thread_error_get_type (void) { static GType type = 0; if (!type) - type = g_enum_register_static ("GThreadError", _gperl_g_thread_error_values); + type = g_enum_register_static ("GThreadError", _gperl_thread_error_values); return type; } -#define GPERL_TYPE_THREAD_ERROR gperl_g_thread_error_get_type() -GType gperl_g_thread_error_get_type (void); - +#define GPERL_TYPE_THREAD_ERROR gperl_thread_error_get_type() +GType gperl_thread_error_get_type (void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/gperl-gtypes.h new/Glib-1.303/gperl-gtypes.h --- old/Glib-1.302/gperl-gtypes.h 2011-11-27 08:56:58.000000000 +0100 +++ new/Glib-1.303/gperl-gtypes.h 2013-12-08 20:27:50.000000000 +0100 @@ -1,6 +1,3 @@ - -/* Generated data (by glib-mkenums) */ - #ifndef __GPERL_GTYPES_H__ #define __GPERL_GTYPES_H__ 1 @@ -8,46 +5,80 @@ G_BEGIN_DECLS +/* --- Enums/Flags: --------------------------------------------------------- */ + +#define GPERL_TYPE_CONNECT_FLAGS gperl_connect_flags_get_type () +GType gperl_connect_flags_get_type (void) G_GNUC_CONST; + +#if GLIB_CHECK_VERSION (2, 6, 0) +#define GPERL_TYPE_KEY_FILE_FLAGS gperl_key_file_flags_get_type() +GType gperl_key_file_flags_get_type (void) G_GNUC_CONST; +#endif + +#define GPERL_TYPE_LOG_LEVEL_FLAGS gperl_log_level_flags_get_type () +GType gperl_log_level_flags_get_type (void) G_GNUC_CONST; + +#if GLIB_CHECK_VERSION (2, 6, 0) +#define GPERL_TYPE_OPTION_FLAGS gperl_option_flags_get_type () +GType gperl_option_flags_get_type (void) G_GNUC_CONST; +#endif #if GLIB_CHECK_VERSION (2, 12, 0) -#define GPERL_TYPE_BOOKMARK_FILE_ERROR gperl_g_bookmark_file_error_get_type() -GType gperl_g_bookmark_file_error_get_type (void); +#define GPERL_TYPE_OPTION_ARG gperl_option_arg_get_type () +GType gperl_option_arg_get_type (void) G_GNUC_CONST; +#endif + +/* the obvious G_TYPE_PARAM_FLAGS is taken by GParamSpecFlags. */ +#define GPERL_TYPE_PARAM_FLAGS gperl_param_flags_get_type () +GType gperl_param_flags_get_type (void) G_GNUC_CONST; + +#define GPERL_TYPE_SIGNAL_FLAGS gperl_signal_flags_get_type () +GType gperl_signal_flags_get_type (void) G_GNUC_CONST; + +#define GPERL_TYPE_SPAWN_FLAGS gperl_spawn_flags_get_type () +GType gperl_spawn_flags_get_type (void) G_GNUC_CONST; + +#if GLIB_CHECK_VERSION (2, 14, 0) +#define GPERL_TYPE_USER_DIRECTORY gperl_user_directory_get_type () +GType gperl_user_directory_get_type (void) G_GNUC_CONST; +#endif + +/* --- Error values: -------------------------------------------------------- */ + +#if GLIB_CHECK_VERSION (2, 12, 0) +#define GPERL_TYPE_BOOKMARK_FILE_ERROR gperl_bookmark_file_error_get_type () +GType gperl_bookmark_file_error_get_type (void) G_GNUC_CONST; #endif /* GLIB_CHECK_VERSION (2, 12, 0) */ -#define GPERL_TYPE_CONVERT_ERROR gperl_g_convert_error_get_type() -GType gperl_g_convert_error_get_type (void); +#define GPERL_TYPE_CONVERT_ERROR gperl_convert_error_get_type () +GType gperl_convert_error_get_type (void) G_GNUC_CONST; -#define GPERL_TYPE_FILE_ERROR gperl_g_file_error_get_type() -GType gperl_g_file_error_get_type (void); +#define GPERL_TYPE_FILE_ERROR gperl_file_error_get_type () +GType gperl_file_error_get_type (void) G_GNUC_CONST; #if GLIB_CHECK_VERSION (2, 6, 0) -#define GPERL_TYPE_KEY_FILE_ERROR gperl_g_key_file_error_get_type() -GType gperl_g_key_file_error_get_type (void); +#define GPERL_TYPE_KEY_FILE_ERROR gperl_key_file_error_get_type () +GType gperl_key_file_error_get_type (void) G_GNUC_CONST; #endif /* GLIB_CHECK_VERSION (2, 6, 0) */ -#define GPERL_TYPE_IO_ERROR gperl_g_io_error_get_type() -GType gperl_g_io_error_get_type (void); - -#define GPERL_TYPE_IO_CHANNEL_ERROR gperl_g_io_channel_error_get_type() -GType gperl_g_io_channel_error_get_type (void); +#define GPERL_TYPE_IO_ERROR gperl_io_error_get_type () +GType gperl_io_error_get_type (void) G_GNUC_CONST; -#define GPERL_TYPE_MARKUP_ERROR gperl_g_markup_error_get_type() -GType gperl_g_markup_error_get_type (void); +#define GPERL_TYPE_IO_CHANNEL_ERROR gperl_io_channel_error_get_type () +GType gperl_io_channel_error_get_type (void) G_GNUC_CONST; -#define GPERL_TYPE_SHELL_ERROR gperl_g_shell_error_get_type() -GType gperl_g_shell_error_get_type (void); +#define GPERL_TYPE_MARKUP_ERROR gperl_markup_error_get_type () +GType gperl_markup_error_get_type (void) G_GNUC_CONST; -#define GPERL_TYPE_SPAWN_ERROR gperl_g_spawn_error_get_type() -GType gperl_g_spawn_error_get_type (void); +#define GPERL_TYPE_SHELL_ERROR gperl_shell_error_get_type () +GType gperl_shell_error_get_type (void) G_GNUC_CONST; -#define GPERL_TYPE_THREAD_ERROR gperl_g_thread_error_get_type() -GType gperl_g_thread_error_get_type (void); +#define GPERL_TYPE_SPAWN_ERROR gperl_spawn_error_get_type () +GType gperl_spawn_error_get_type (void) G_GNUC_CONST; +#define GPERL_TYPE_THREAD_ERROR gperl_thread_error_get_type () +GType gperl_thread_error_get_type (void) G_GNUC_CONST; G_END_DECLS #endif /* __GPERL_GTYPES_H__ */ - - -/* Generated data ends here */ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/lib/Glib/CodeGen.pm new/Glib-1.303/lib/Glib/CodeGen.pm --- old/Glib-1.302/lib/Glib/CodeGen.pm 2013-09-29 08:07:57.000000000 +0200 +++ new/Glib-1.303/lib/Glib/CodeGen.pm 2013-12-09 00:27:32.000000000 +0100 @@ -5,7 +5,7 @@ use Carp; use IO::File; -our $VERSION = '1.302'; +our $VERSION = '1.303'; # type handlers should look like this: # sub gen_foo_stuff { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/lib/Glib/GenPod.pm new/Glib-1.303/lib/Glib/GenPod.pm --- old/Glib-1.302/lib/Glib/GenPod.pm 2013-09-29 08:08:03.000000000 +0200 +++ new/Glib-1.303/lib/Glib/GenPod.pm 2013-12-09 00:27:39.000000000 +0100 @@ -9,7 +9,7 @@ package Glib::GenPod; -our $VERSION = '1.302'; +our $VERSION = '1.303'; use strict; use warnings; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/lib/Glib/MakeHelper.pm new/Glib-1.303/lib/Glib/MakeHelper.pm --- old/Glib-1.302/lib/Glib/MakeHelper.pm 2013-09-29 08:08:08.000000000 +0200 +++ new/Glib-1.303/lib/Glib/MakeHelper.pm 2013-12-09 00:27:45.000000000 +0100 @@ -4,7 +4,7 @@ package Glib::MakeHelper; -our $VERSION = '1.302'; +our $VERSION = '1.303'; =head1 NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/lib/Glib/Object/Subclass.pm new/Glib-1.303/lib/Glib/Object/Subclass.pm --- old/Glib-1.302/lib/Glib/Object/Subclass.pm 2013-09-29 08:08:13.000000000 +0200 +++ new/Glib-1.303/lib/Glib/Object/Subclass.pm 2013-12-09 00:28:03.000000000 +0100 @@ -20,7 +20,7 @@ package Glib::Object::Subclass; -our $VERSION = '1.302'; +our $VERSION = '1.303'; use Glib; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/lib/Glib/ParseXSDoc.pm new/Glib-1.303/lib/Glib/ParseXSDoc.pm --- old/Glib-1.302/lib/Glib/ParseXSDoc.pm 2013-09-29 08:08:20.000000000 +0200 +++ new/Glib-1.303/lib/Glib/ParseXSDoc.pm 2013-12-09 00:27:51.000000000 +0100 @@ -13,7 +13,7 @@ xsdocparse ); -our $VERSION = '1.302'; +our $VERSION = '1.303'; our $NOISY = $ENV{NOISYDOC}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/lib/Glib.pm new/Glib-1.303/lib/Glib.pm --- old/Glib-1.302/lib/Glib.pm 2013-09-29 08:07:51.000000000 +0200 +++ new/Glib-1.303/lib/Glib.pm 2013-12-09 00:27:03.000000000 +0100 @@ -27,7 +27,7 @@ require DynaLoader; our @ISA = qw(DynaLoader Exporter); -our $VERSION = '1.302'; +our $VERSION = '1.303'; use constant { TRUE => 1, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.302/t/7.t new/Glib-1.303/t/7.t --- old/Glib-1.302/t/7.t 2012-01-06 07:26:40.000000000 +0100 +++ new/Glib-1.303/t/7.t 2013-12-08 20:27:50.000000000 +0100 @@ -84,23 +84,23 @@ flags => 'run-last', return_type => 'Glib::Scalar', accumulator => sub { - # the accumulator gets (ihint, return_accu, handler_return) + my ($ihint, $return_accu, $handler_return) = @_; # let's turn the return_accu into a list of all the handlers' # return values. this is weird, but the sort of thing you # might actually want to do. - print "# in accumulator, got $_[2], previously " - . (defined ($_[1]) ? $_[1] : 'undef') + print "# in accumulator, got $handler_return, previously " + . (defined ($return_accu) ? $return_accu : 'undef') . "\n"; - if ('ARRAY' eq ref $_[1]) { - push @{$_[1]}, $_[2]; + if ('ARRAY' eq ref $return_accu) { + push @{$return_accu}, $handler_return; } else { - $_[1] = [$_[2]]; + $return_accu = [$handler_return]; } # we must return two values --- a boolean that says whether # the signal keeps emitting, and the accumulated return value. # we'll stop emitting if the handler returns the magic # value 42. - ($_[2] != 42, $_[1]) + ($handler_return != 42, $return_accu) }, }, }, -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
