Hello community, here is the log from the commit of package perl-Glib for openSUSE:Factory checked in at 2015-10-19 22:50:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-08-25 08:54:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Glib.new/perl-Glib.changes 2015-10-20 00:04:41.000000000 +0200 @@ -1,0 +2,8 @@ +Sat Oct 10 13:26:03 UTC 2015 - [email protected] + +- Update to 1.314: + * Fix compilation on libglib < 2.26. + * Add Glib::Bytes, a wrapper for GBytes. + * Sort the output of podify_signals in a deterministic way. + +------------------------------------------------------------------- Old: ---- Glib-1.313.tar.gz New: ---- Glib-1.314.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Glib.spec ++++++ --- /var/tmp/diff_new_pack.WqQz9q/_old 2015-10-20 00:04:41.000000000 +0200 +++ /var/tmp/diff_new_pack.WqQz9q/_new 2015-10-20 00:04:41.000000000 +0200 @@ -18,7 +18,7 @@ %define cpan_name Glib Name: perl-Glib -Version: 1.313 +Version: 1.314 Release: 0 Summary: Perl wrappers for the GLib utility and Object libraries License: LGPL-2.1+ ++++++ Glib-1.313.tar.gz -> Glib-1.314.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/GBoxed.xs new/Glib-1.314/GBoxed.xs --- old/Glib-1.313/GBoxed.xs 2013-09-29 08:00:53.000000000 +0200 +++ new/Glib-1.314/GBoxed.xs 2015-09-22 17:06:04.000000000 +0200 @@ -811,6 +811,9 @@ #if GLIB_CHECK_VERSION (2, 26, 0) gperl_register_boxed (G_TYPE_ERROR, "Glib::Error", &gerror_wrapper_class); #endif +#if GLIB_CHECK_VERSION (2, 32, 0) + gperl_register_boxed (G_TYPE_BYTES, "Glib::Bytes", NULL); +#endif =for object Glib::Boxed Generic wrappers for C structures @@ -902,3 +905,45 @@ : NULL; if (destroy) (*destroy) (sv); + +MODULE = Glib::Boxed PACKAGE = Glib::Bytes PREFIX = g_bytes_ + +=for DESCRIPTION + +=head1 DESCRIPTION + +In addition to the low-level API documented below, L<Glib> also provides +stringification overloading so that you can treat any C<Glib::Bytes> object as +a normal Perl string. + +=cut + +GBytes_own * +g_bytes_new (class, SV *data) + PREINIT: + const char *real_data; + STRLEN len; + CODE: + real_data = SvPVbyte (data, len); + RETVAL = g_bytes_new (real_data, len); + OUTPUT: + RETVAL + +SV * +g_bytes_get_data (GBytes *bytes) + PREINIT: + gconstpointer data; + gsize size; + CODE: + data = g_bytes_get_data (bytes, &size); + RETVAL = newSVpv (data, size); + OUTPUT: + RETVAL + +gsize g_bytes_get_size (GBytes *bytes); + +guint g_bytes_hash (GBytes *bytes); + +gboolean g_bytes_equal (GBytes *bytes1, GBytes *bytes2); + +gint g_bytes_compare (GBytes *bytes1, GBytes *bytes2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/GVariant.xs new/Glib-1.314/GVariant.xs --- old/Glib-1.313/GVariant.xs 2015-07-08 19:48:49.000000000 +0200 +++ new/Glib-1.314/GVariant.xs 2015-09-26 19:10:48.000000000 +0200 @@ -40,10 +40,15 @@ if (own) { #if GLIB_CHECK_VERSION (2, 30, 0) g_variant_take_ref (variant); -#else +#elif GLIB_CHECK_VERSION (2, 26, 0) if (g_variant_is_floating (variant)) { g_variant_ref_sink (variant); } +#else + /* In this case, we have no way of finding out whether the + * variant has a floating ref, so we just always ref_sink even + * if this might cause a leak in some cases. */ + g_variant_ref_sink (variant); #endif } else { g_variant_ref (variant); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/MANIFEST new/Glib-1.314/MANIFEST --- old/Glib-1.313/MANIFEST 2015-08-10 02:43:51.000000000 +0200 +++ new/Glib-1.314/MANIFEST 2015-09-30 22:35:53.000000000 +0200 @@ -54,6 +54,7 @@ t/a.t t/b.t t/boxed_errors.t +t/bytes.t t/c.t t/constants.t t/d.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/META.json new/Glib-1.314/META.json --- old/Glib-1.313/META.json 2015-08-10 02:43:51.000000000 +0200 +++ new/Glib-1.314/META.json 2015-09-30 22:35:53.000000000 +0200 @@ -81,5 +81,5 @@ }, "x_MailingList" : "https://mail.gnome.org/mailman/listinfo/gtk-perl-list" }, - "version" : "1.313" + "version" : "1.314" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/META.yml new/Glib-1.314/META.yml --- old/Glib-1.313/META.yml 2015-08-10 02:43:51.000000000 +0200 +++ new/Glib-1.314/META.yml 2015-09-30 22:35:52.000000000 +0200 @@ -51,4 +51,4 @@ homepage: http://gtk2-perl.sourceforge.net license: http://www.gnu.org/licenses/lgpl-2.1.html repository: git://git.gnome.org/perl-Glib -version: '1.313' +version: '1.314' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/NEWS new/Glib-1.314/NEWS --- old/Glib-1.313/NEWS 2015-08-10 02:41:17.000000000 +0200 +++ new/Glib-1.314/NEWS 2015-09-30 22:32:50.000000000 +0200 @@ -1,3 +1,10 @@ +Overview of changes in Glib 1.314 (unstable) +============================================ + +* Fix compilation on libglib < 2.26 +* Add Glib::Bytes, a wrapper for GBytes +* Sort the output of podify_signals in a deterministic way (BZ#743863) + Overview of changes in Glib 1.313 (unstable) ============================================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/gperl.h new/Glib-1.314/gperl.h --- old/Glib-1.313/gperl.h 2015-01-24 14:12:23.000000000 +0100 +++ new/Glib-1.314/gperl.h 2015-09-22 17:06:04.000000000 +0200 @@ -362,7 +362,7 @@ #endif /* - * -- GVariant ---------------------------------------------------------------- + * --- GVariant --------------------------------------------------------------- */ #if GLIB_CHECK_VERSION (2, 24, 0) @@ -379,6 +379,16 @@ #endif /* 2.24.0 */ /* + * --- GBytes ----------------------------------------------------------------- + */ +#if GLIB_CHECK_VERSION (2, 32, 0) +typedef GBytes GBytes_own; +#define SvGBytes(sv) (gperl_get_boxed_check ((sv), G_TYPE_BYTES)) +#define newSVGBytes(val) (gperl_new_boxed ((gpointer) (val), G_TYPE_BYTES, FALSE)) +#define newSVGBytes_own(val) (gperl_new_boxed ((gpointer) (val), G_TYPE_BYTES, TRUE)) +#endif + +/* * --- miscellaneous ---------------------------------------------------------- */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/lib/Glib/CodeGen.pm new/Glib-1.314/lib/Glib/CodeGen.pm --- old/Glib-1.313/lib/Glib/CodeGen.pm 2015-08-10 02:39:23.000000000 +0200 +++ new/Glib-1.314/lib/Glib/CodeGen.pm 2015-09-30 22:33:47.000000000 +0200 @@ -5,7 +5,7 @@ use Carp; use IO::File; -our $VERSION = '1.313'; +our $VERSION = '1.314'; # type handlers should look like this: # sub gen_foo_stuff { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/lib/Glib/GenPod.pm new/Glib-1.314/lib/Glib/GenPod.pm --- old/Glib-1.313/lib/Glib/GenPod.pm 2015-08-10 02:39:29.000000000 +0200 +++ new/Glib-1.314/lib/Glib/GenPod.pm 2015-09-30 22:34:00.000000000 +0200 @@ -9,7 +9,7 @@ package Glib::GenPod; -our $VERSION = '1.313'; +our $VERSION = '1.314'; use strict; use warnings; @@ -710,7 +710,7 @@ my @sigs = Glib::Type->list_signals (shift); return undef unless @sigs; $str = "=over\n\n"; - foreach (@sigs) { + foreach (sort {$a->{signal_name} cmp $b->{signal_name} } @sigs) { $str .= '=item '; $str .= convert_type ($_->{return_type}).' = ' if exists $_->{return_type}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/lib/Glib/MakeHelper.pm new/Glib-1.314/lib/Glib/MakeHelper.pm --- old/Glib-1.313/lib/Glib/MakeHelper.pm 2015-08-10 02:40:23.000000000 +0200 +++ new/Glib-1.314/lib/Glib/MakeHelper.pm 2015-09-30 22:34:10.000000000 +0200 @@ -4,7 +4,7 @@ package Glib::MakeHelper; -our $VERSION = '1.313'; +our $VERSION = '1.314'; =head1 NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/lib/Glib/Object/Subclass.pm new/Glib-1.314/lib/Glib/Object/Subclass.pm --- old/Glib-1.313/lib/Glib/Object/Subclass.pm 2015-08-10 02:40:31.000000000 +0200 +++ new/Glib-1.314/lib/Glib/Object/Subclass.pm 2015-09-30 22:34:27.000000000 +0200 @@ -20,7 +20,7 @@ package Glib::Object::Subclass; -our $VERSION = '1.313'; +our $VERSION = '1.314'; use Glib; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/lib/Glib/ParseXSDoc.pm new/Glib-1.314/lib/Glib/ParseXSDoc.pm --- old/Glib-1.313/lib/Glib/ParseXSDoc.pm 2015-08-10 02:40:39.000000000 +0200 +++ new/Glib-1.314/lib/Glib/ParseXSDoc.pm 2015-09-30 22:35:23.000000000 +0200 @@ -13,7 +13,7 @@ xsdocparse ); -our $VERSION = '1.313'; +our $VERSION = '1.314'; our $NOISY = $ENV{NOISYDOC}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/lib/Glib.pm new/Glib-1.314/lib/Glib.pm --- old/Glib-1.313/lib/Glib.pm 2015-08-10 02:31:25.000000000 +0200 +++ new/Glib-1.314/lib/Glib.pm 2015-09-30 22:33:36.000000000 +0200 @@ -27,7 +27,7 @@ require DynaLoader; our @ISA = qw(DynaLoader Exporter); -our $VERSION = '1.313'; +our $VERSION = '1.314'; use constant { TRUE => 1, @@ -100,6 +100,12 @@ sub value { $_[0]->{value} } sub code { $_[0]->{code} } +package Glib::Bytes; + +use overload + '""' => sub { $_[0]->get_data }, + fallback => 1; + package Glib::Object::Property; use Carp; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/t/bytes.t new/Glib-1.314/t/bytes.t --- old/Glib-1.313/t/bytes.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Glib-1.314/t/bytes.t 2015-09-22 17:06:04.000000000 +0200 @@ -0,0 +1,50 @@ +#!/usr/bin/perl + +# +# Test the GBytes wrappers. +# + +use strict; +use warnings; +use Glib; +use Test::More; + +unless (Glib -> CHECK_VERSION (2, 32, 0)) { + plan skip_all => 'GBytes is new in 2.32'; +} else { + plan tests => 13; +} + +# Basic API. +my $data = pack 'C*', 0..255; + +my $bytes = Glib::Bytes->new ($data); +isa_ok ($bytes, 'Glib::Bytes'); +isa_ok ($bytes, 'Glib::Boxed'); + +is ($bytes->get_size, length $data); +is ($bytes->get_data, $data); + +ok (defined $bytes->hash); +ok ($bytes->equal ($bytes)); +is ($bytes->compare ($bytes), 0); + +# Overloading. +is ("$bytes", $data, '"" overloading'); +ok ($bytes eq $data, 'eq overloading'); +is (length $bytes, length $data, 'length overloading'); + +# Wide characters. +eval { + my $wstring = "\x{2665}"; + my $bytes = Glib::Bytes->new ($wstring); +}; +like ($@, qr/Wide character/); + +eval { + my $wstring = "\x{2665}"; + utf8::encode ($wstring); + my $bytes = Glib::Bytes->new ($wstring); + is ($bytes->get_data, pack ('C*', 0xE2,0x99,0xA5)); +}; +is ($@, ''); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Glib-1.313/typemap new/Glib-1.314/typemap --- old/Glib-1.313/typemap 2015-01-24 14:12:23.000000000 +0100 +++ new/Glib-1.314/typemap 2015-09-22 17:06:04.000000000 +0200 @@ -108,6 +108,9 @@ const GVariantType * T_GPERL_GENERIC_WRAPPER GVariantType_own * T_GPERL_GENERIC_WRAPPER +GBytes * T_GPERL_GENERIC_WRAPPER +GBytes_own * T_GPERL_GENERIC_WRAPPER + ############################################################################### INPUT
