Mailinglist Archive: opensuse-commit (1650 mails)

< Previous Next >
commit perl-Glib
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 06 Oct 2008 17:16:56 +0200
  • Message-id: <20081006151657.29F7C678159@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package perl-Glib
checked in at Mon Oct 6 17:16:56 CEST 2008.


--------
--- perl-Glib/perl-Glib.changes 2008-06-19 17:21:17.000000000 +0200
+++ /mounts/work_src_done/STABLE/perl-Glib/perl-Glib.changes 2008-10-06
14:36:32.000000000 +0200
@@ -1,0 +2,24 @@
+Mon Oct 6 14:32:31 CEST 2008 - anicka@xxxxxxx
+
+- update to 1.200
+ * GClosure.xs (gperl_callback_invoke): Instead of putting a mortal
+ copy of the user data on the stack, increment its ref count and
+ mortalize it. This ensure that modifications to $_[-1] in the
+ callback actually change the user data. Patch by Kevin Ryde.
+ * GValue.xs: Handle NULL GParamSpecs in newSVGParamSpec by
+ returning undef. Consequently, remove the NULL handling in
+ _gperl_sv_from_value_internal.
+ * GType.xs (gperl_convert_flag_one, gperl_convert_flags): Improve
+ the wording of the error messages for invalid flags a bit.
+ * GValue.xs (_gperl_sv_from_value_internal): Handle NULL
+ GParamSpecs gracefully by returning undef.
+ * GParamSpec.xs (newSVGParamSpec): Croak on NULL GParamSpecs.
+ * GParamSpec.xs: Add hierarchy POD sections to the various
+ Glib::ParamSpec subclasses.
+ * GenPod.pm: Document how to hide arguments with "=for arg". Cope
+ with _noinc_ornull type variants.
+ * GObject.xs (g_object_new): Check that we got a correct number of
+ arguments.
+ * test fixes
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
Glib-1.183.tar.bz2

New:
----
Glib-1.200.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Glib.spec ++++++
--- /var/tmp/diff_new_pack.k23485/_old 2008-10-06 17:16:45.000000000 +0200
+++ /var/tmp/diff_new_pack.k23485/_new 2008-10-06 17:16:45.000000000 +0200
@@ -1,10 +1,17 @@
#
-# spec file for package perl-Glib (Version 1.183)
+# spec file for package perl-Glib (Version 1.200)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

@@ -13,7 +20,7 @@

Name: perl-Glib
BuildRequires: glib2-devel perl-ExtUtils-Depends perl-ExtUtils-PkgConfig
-Version: 1.183
+Version: 1.200
Release: 1
Requires: perl = %{perl_version}
AutoReqProv: on
@@ -72,6 +79,27 @@
/var/adm/perl-modules/%{name}

%changelog
+* Mon Oct 06 2008 anicka@xxxxxxx
+- update to 1.200
+ * GClosure.xs (gperl_callback_invoke): Instead of putting a mortal
+ copy of the user data on the stack, increment its ref count and
+ mortalize it. This ensure that modifications to $_[-1] in the
+ callback actually change the user data. Patch by Kevin Ryde.
+ * GValue.xs: Handle NULL GParamSpecs in newSVGParamSpec by
+ returning undef. Consequently, remove the NULL handling in
+ _gperl_sv_from_value_internal.
+ * GType.xs (gperl_convert_flag_one, gperl_convert_flags): Improve
+ the wording of the error messages for invalid flags a bit.
+ * GValue.xs (_gperl_sv_from_value_internal): Handle NULL
+ GParamSpecs gracefully by returning undef.
+ * GParamSpec.xs (newSVGParamSpec): Croak on NULL GParamSpecs.
+ * GParamSpec.xs: Add hierarchy POD sections to the various
+ Glib::ParamSpec subclasses.
+ * GenPod.pm: Document how to hide arguments with "=for arg". Cope
+ with _noinc_ornull type variants.
+ * GObject.xs (g_object_new): Check that we got a correct number of
+ arguments.
+ * test fixes
* Thu Jun 19 2008 anicka@xxxxxxx
- update to 1.183
* GSignal.xs: In the xsub for g_signal_add_emission_hook,

++++++ Glib-1.183.tar.bz2 -> Glib-1.200.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/ChangeLog new/Glib-1.200/ChangeLog
--- old/Glib-1.183/ChangeLog 2008-06-02 10:40:07.000000000 +0200
+++ new/Glib-1.200/ChangeLog 2008-09-20 15:01:18.000000000 +0200
@@ -1,17 +1,145 @@
-2008-06-02 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+2008-09-20 Torsten Schoenfeld <kaffeetisch@xxxxxx>

* Glib.pm
+ * Makefile.PL
* NEWS
- * README: Stable release 1.183.
+ * README: Stable release 1.200.

-2008-05-31 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+2008-09-20 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * TODO: Remove the entry about hushing about documentation
+ generation. That's done.
+
+2008-09-07 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * Glib.pm
+ * NEWS
+ * README: Unstable release 1.193.
+
+2008-09-07 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * GClosure.xs (gperl_callback_invoke): Instead of putting a mortal
+ copy of the user data on the stack, increment its ref count and
+ mortalize it. This ensure that modifications to $_[-1] in the
+ callback actually change the user data. Patch by Kevin Ryde.
+
+ * MANIFEST
+ * GObject.xs
+ * t/lazy-loader.t: Make sure the lazy loader can handle being
+ invoked on packages which aren't registered with the Glib type
+ system. This can happen when a non-registered package is setup to
+ inherit from a registered package, and when then some method is
+ invoked on the non-registered package. This gets rid of the
+ spurious "asked to lazy-load Foo, but that package is not
+ registered" warnings.
+
+2008-09-06 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * GParamSpec.xs:
+ * GValue.xs: Handle NULL GParamSpecs in newSVGParamSpec by
+ returning undef. Consequently, remove the NULL handling in
+ _gperl_sv_from_value_internal. This partly reverts the commit
+ from 2008-08-18 and brings newSVGParamSpec in line with the other
+ SV* constructors.
+
+ * GObject.xs
+ * t/5.t: Fix the stack handling in Glib::Object::get to be robust
+ against stack movement due to reallocation. This can happen if a
+ subclass' GET_PROPERTY triggers a stack resize. Patch by Kevin
+ Ryde.
+
+2008-08-31 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * Glib.pm
+ * NEWS
+ * README: Unstable release 1.192.
+
+2008-08-31 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * MakeHelper.pm (postamble_docs_full): Fix the POD index
+ generation. For five months now, broken index pages (like
+ Glib::index) were being created due to shell command quoting
+ issues.
+
+2008-08-23 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * GType.xs (gperl_convert_flag_one, gperl_convert_flags): Improve
+ the wording of the error messages for invalid flags a bit.
+
+ * t/4.t: Prettify a bit by using ok(), pass(), and fail()
+ functions.
+
+2008-08-18 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * Glib.pm
+ * NEWS
+ * README: Unstable release 1.191.
+
+2008-08-18 Torsten Schoenfeld <kaffeetisch@xxxxxx>

- Merge from HEAD:
+ * t/e.t
+ * GValue.xs (_gperl_sv_from_value_internal): Handle NULL
+ GParamSpecs gracefully by returning undef.
+
+ * GParamSpec.xs (newSVGParamSpec): Croak on NULL GParamSpecs.
+
+2008-08-17 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * GParamSpec.xs: Add hierarchy POD sections to the various
+ Glib::ParamSpec subclasses.
+
+2008-08-16 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * GenPod.pm: Document how to hide arguments with "=for arg". Cope
+ with _noinc_ornull type variants.
+
+2008-08-03 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * GObject.xs (g_object_new): Check that we got a correct number of
+ arguments.
+
+ * t/2.t: Fix a typo uncovered by the above change.
+
+2008-07-13 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * GType.xs
+ * t/c.t: In the overloaded flags operators, don't choke on undef
+ in the swap argument. This happens when a normal 'x' operator is
+ used for handling 'x='. Patch by Kevin Ryde.
+
+2008-06-22 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * Glib.pm
+ * Makefile.PL
+ * NEWS
+ * README: Unstable release 1.190.
+
+2008-06-13 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * GObject.xs (gperl_get_object_check): Croak on objects that don't
+ carry magic.
+
+2008-06-01 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * GType.xs: Fix typo in error message output by Glib::Flags::new.
+
+ * GUtils.xs
+ * t/1.t: Provide Glib::strerror and Glib::strsignal. Patch by
+ Kevin Ryde.
+
+2008-05-31 Torsten Schoenfeld <kaffeetisch@xxxxxx>

* GSignal.xs: In the xsub for g_signal_add_emission_hook, make
sure that the type class exists before we try to fetch information
about one of its signals.

+2008-05-23 Torsten Schoenfeld <kaffeetisch@xxxxxx>
+
+ * GType.xs
+ * t/c.t: Add Glib::Flags::new, a constructor for flags objects
+ that can be used with the overloaded operators. Patch by Kevin
+ Ryde and muppet.
+
2008-05-22 Torsten Schoenfeld <kaffeetisch@xxxxxx>

* GType.xs
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/GClosure.xs new/Glib-1.200/GClosure.xs
--- old/Glib-1.183/GClosure.xs 2008-05-23 00:02:01.000000000 +0200
+++ new/Glib-1.200/GClosure.xs 2008-09-07 21:02:31.000000000 +0200
@@ -16,7 +16,7 @@
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
*
- * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GClosure.xs,v 1.31 2008/05/20
19:41:46 kaffeetisch Exp $
+ * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GClosure.xs,v 1.32 2008/09/07
19:02:31 kaffeetisch Exp $
*/

=head2 GClosure / GPerlClosure
@@ -402,26 +402,25 @@
}
}

- /* This is sv_mortalcopy() in case our GPerlCallback is destroyed
- * from within the called func. That can happen for instance with
- * the uri handler on Gtk2::LinkButton. If the called handler
- * disconnects itself, or installs a new handler with different
- * data, then gtk_link_button_set_uri_hook simply calls the destroy
- * on the existing handler immediately, making
- * gperl_callback_destroy do a SvREFCNT_dec on our callback->data.
- * The symptom then is the pushed userdata arg $_[2] invalidated.
+ /* Usual REFCNT_inc and 2mortal here for putting something on the
+ * stack. It's possible callback->func will disconnect itself, in
+ * which case gperl_callback_destroy() will REFCNT_dec the data.
+ * That's fine, it leaves the mortal ref on the stack as the only
+ * one remaining, and the next FREETMPS will decrement and destroy
+ * in the usual way.
*
- * If you're wondering why this doesn't arise with
- * g_signal_handler_add_emission_hook funcs, it's because the signal
- * emission mechanism has some trickery to defer the destroy of the
- * callback until after it returns (it's held in a GHook and the ref
- * count there is bumped for the duration of the call). Presumably
- * it's a matter of opinion whether deferring the destroy is good or
- * bad, but sv_mortalcopy here copes with either.
+ * Being a plain push here means callback->func can modify its
+ * $_[-1] to modify the stored userdata. Slightly scary, but it's a
+ * cute way to get a free bit of per-connection data you can play
+ * with as a state variable or whatnot. And not making a copy saves
+ * a couple of bytes of memory :-).
*/
- if (callback->data)
- XPUSHs (sv_mortalcopy (callback->data));
-
+ {
+ SV *data = callback->data;
+ if (data) {
+ XPUSHs (sv_2mortal (SvREFCNT_inc (data)));
+ }
+ }
va_end (var_args);

PUTBACK;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/GenPod.pm new/Glib-1.200/GenPod.pm
--- old/Glib-1.183/GenPod.pm 2008-05-23 00:02:01.000000000 +0200
+++ new/Glib-1.200/GenPod.pm 2008-08-16 17:42:13.000000000 +0200
@@ -176,7 +176,8 @@

The arg directive adds or overrides an argument description. The
description text is optional, as is the type specification (the part
-in parentheses). The arg name does I<not> need to include a sigil,
+in parentheses). If you want to hide an argument, specify C<__hide__>
+as its type. The arg name does I<not> need to include a sigil,
as dollar signs will be added. FIXME what about @ for lists?

=back
@@ -1059,7 +1060,7 @@
}

# variant type
- $ctype =~ s/(?:_(ornull|own|copy|own_ornull|noinc))$//;
+ $ctype =~ s/(?:_(ornull|copy|own_ornull|own|noinc_ornull|noinc))$//;
my $variant = $1 || "";

my $perl_type;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/Glib.pm new/Glib-1.200/Glib.pm
--- old/Glib-1.183/Glib.pm 2008-06-02 10:40:44.000000000 +0200
+++ new/Glib-1.200/Glib.pm 2008-09-20 15:01:26.000000000 +0200
@@ -15,7 +15,7 @@
# along with this library; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
#
-# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/Glib.pm,v 1.121.2.1 2008/06/02
08:40:44 kaffeetisch Exp $
+# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/Glib.pm,v 1.126 2008/09/20
13:01:26 kaffeetisch Exp $
#

package Glib;
@@ -63,7 +63,7 @@
our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
$EXPORT_TAGS{all} = \@EXPORT_OK;

-our $VERSION = '1.183';
+our $VERSION = '1.200';

sub dl_load_flags { $^O eq 'darwin' ? 0x00 : 0x01 }

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/GObject.xs new/Glib-1.200/GObject.xs
--- old/Glib-1.183/GObject.xs 2008-05-23 00:02:01.000000000 +0200
+++ new/Glib-1.200/GObject.xs 2008-09-07 20:37:05.000000000 +0200
@@ -16,7 +16,7 @@
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
*
- * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GObject.xs,v 1.74 2008/01/08
05:58:56 muppetman Exp $
+ * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GObject.xs,v 1.78 2008/09/07
10:32:13 kaffeetisch Exp $
*/

/*
@@ -247,6 +247,50 @@
#endif
}

+static ClassInfo *
+find_registered_type_in_ancestry (const char *package)
+{
+ char *isa_name;
+ AV *isa;
+
+ isa_name = g_strconcat (package, "::ISA", NULL);
+ isa = get_av (isa_name, FALSE); /* supposed to exist already */
+ g_free (isa_name);
+
+ if (isa) {
+ int i, n_items = av_len (isa) + 1;
+ for (i = 0; i < n_items; i++) {
+ ClassInfo *class_info;
+ SV **entry;
+
+ entry = av_fetch (isa, i, 0);
+ if (!entry || !gperl_sv_is_defined (*entry))
+ continue;
+
+ G_LOCK (types_by_package);
+ class_info = (ClassInfo*)
+ g_hash_table_lookup (types_by_package,
+ SvPV_nolen (*entry));
+ G_UNLOCK (types_by_package);
+
+ if (!class_info) {
+ /* If this package is not registered, maybe one
+ * of its ancestors is? So try to recurse into
+ * this package's @ISA. */
+ class_info =
+ find_registered_type_in_ancestry (
+ SvPV_nolen (*entry));
+ }
+
+ if (class_info) {
+ return class_info;
+ }
+ }
+ }
+
+ return NULL;
+}
+

=item void gperl_register_object (GType gtype, const char * package)

@@ -824,6 +868,10 @@
croak ("%s is not of type %s",
gperl_format_variable_for_output (sv),
package);
+ if (!mg_find (SvRV (sv), PERL_MAGIC_ext))
+ croak ("%s is not a proper Glib::Object "
+ "(it doesn't contain magic)",
+ gperl_format_variable_for_output (sv));

return gperl_get_object (sv);
}
@@ -1104,6 +1152,9 @@
if (G_TYPE_IS_ABSTRACT (object_type))
croak ("cannot create instance of abstract (non-instantiatable)"
" type `%s'", g_type_name (object_type));
+ if (0 != ((items - 1) % 2))
+ croak ("new method expects name => value pairs "
+ "(odd number of arguments detected)");
if (items > FIRST_ARG) {
int i;
if (NULL == (oclass = g_type_class_ref (object_type)))
@@ -1183,16 +1234,21 @@
PREINIT:
GValue value = {0,};
int i;
- PPCODE:
+ CODE:
+ /* Use CODE: instead of PPCODE: so we can handle the stack ourselves in
+ * order to avoid that xsubs called by g_object_get_property overwrite
+ * what we put on the stack. */
PERL_UNUSED_VAR (ix);
- EXTEND (SP, items-1);
for (i = 1; i < items; i++) {
char *name = SvPV_nolen (ST (i));
init_property_value (object, name, &value);
g_object_get_property (object, name, &value);
- PUSHs(sv_2mortal(_gperl_sv_from_value_internal(&value, TRUE)));
+ ST (i - 1) =
+ sv_2mortal (
+ _gperl_sv_from_value_internal (&value, TRUE));
g_value_unset (&value);
}
+ XSRETURN (items - 1);


=for apidoc Glib::Object::set
@@ -1537,7 +1593,30 @@
g_hash_table_lookup (types_by_package,
package);
G_UNLOCK (types_by_package);
- if (class_info)
- class_info_finish_loading (class_info);
- else
- warn ("asked to lazy-load %s, but that package is not
registered", package);
+
+ /* This can happen when we get called on a package that is not
+ * registered with the type system but is instead manually set up to
+ * inherit from a package that is registered with the type system. For
+ * example:
+ *
+ * Glib::Object::_LazyLoader
+ * +----Gtk2::Gdk::Pixmap
+ * +----Gtk2::Gdk::Bitmap
+ *
+ * When someone tries to call a method on Gtk2::Gdk::Bitmap before
+ * Gtk2::Gdk::Pixmap has been set up, we get in here and class_info ==
+ * NULL.
+ *
+ * So we walk the package's @ISA and look for a package that is
+ * registered. This is supposed to succeed -- how did we get in here
+ * at all if there is no registered package in the ancestry?
+ */
+ if (!class_info)
+ class_info = find_registered_type_in_ancestry (package);
+
+ if (!class_info)
+ croak ("asked to lazy-load %s, but that package is not "
+ "registered and has no registered packages in its "
+ "ancestry", package);
+
+ class_info_finish_loading (class_info);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/GParamSpec.xs new/Glib-1.200/GParamSpec.xs
--- old/Glib-1.183/GParamSpec.xs 2006-10-17 21:56:32.000000000 +0200
+++ new/Glib-1.200/GParamSpec.xs 2008-09-06 15:28:30.000000000 +0200
@@ -16,7 +16,7 @@
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
*
- * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GParamSpec.xs,v 1.23
2005/10/17 19:26:09 kaffeetisch Exp $
+ * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GParamSpec.xs,v 1.26
2008/09/06 13:28:30 kaffeetisch Exp $
*/

#include "gperl.h"
@@ -147,6 +147,9 @@
HV * stash;
const char * package;

+ if (!pspec)
+ return &PL_sv_undef;
+
g_param_spec_ref (pspec);
g_param_spec_sink (pspec);

@@ -636,6 +639,17 @@
so all of these methods return IVs; the distinction of integer size is
important to the underlying C library and also determines the data value range.

+=head1 HIERARCHY
+
+ Glib::ParamSpec
+ +----Glib::Param::Char
+
+ Glib::ParamSpec
+ +----Glib::Param::Int
+
+ Glib::ParamSpec
+ +----Glib::Param::Long
+
=cut

=for see_also Glib::ParamSpec
@@ -722,6 +736,17 @@
integer size is important to the underlying C library and also determines the
data value range.

+=head1 HIERARCHY
+
+ Glib::ParamSpec
+ +----Glib::Param::UChar
+
+ Glib::ParamSpec
+ +----Glib::Param::UInt
+
+ Glib::ParamSpec
+ +----Glib::Param::ULong
+
=cut

=for see_also Glib::ParamSpec
@@ -804,6 +829,11 @@
really only supports 32 bit integers, so all of these methods convert the
values to and from Perl strings if necessary.

+=head1 HIERARCHY
+
+ Glib::ParamSpec
+ +----Glib::Param::Int64
+
=cut

gint64
@@ -838,6 +868,11 @@
perl really only supports 32 bit integers, so all of these methods convert the
values to and from Perl strings if necessary.

+=head1 HIERARCHY
+
+ Glib::ParamSpec
+ +----Glib::Param::UInt64
+
=cut

guint64
@@ -875,6 +910,14 @@
distinction of size is important to the underlying C library and also
determines the data value range.

+=head1 HIERARCHY
+
+ Glib::ParamSpec
+ +----Glib::Param::Float
+
+ Glib::ParamSpec
+ +----Glib::Param::Double
+
=cut

=for see_also Glib::ParamSpec
@@ -950,6 +993,15 @@

MODULE = Glib::ParamSpec PACKAGE = Glib::Param::Boolean

+=for position post_hierarchy
+
+=head1 HIERARCHY
+
+ Glib::ParamSpec
+ +----Glib::Param::Boolean
+
+=cut
+
=for see_also Glib::ParamSpec
=cut

@@ -962,6 +1014,15 @@

MODULE = Glib::ParamSpec PACKAGE = Glib::Param::Enum

+=for position post_hierarchy
+
+=head1 HIERARCHY
+
+ Glib::ParamSpec
+ +----Glib::Param::Enum
+
+=cut
+
=for see_also Glib::ParamSpec
=cut

@@ -987,6 +1048,15 @@

MODULE = Glib::ParamSpec PACKAGE = Glib::Param::Flags

+=for position post_hierarchy
+
+=head1 HIERARCHY
+
+ Glib::ParamSpec
+ +----Glib::Param::Flags
+
+=cut
+
=for see_also Glib::ParamSpec
=cut

@@ -1013,6 +1083,15 @@

MODULE = Glib::ParamSpec PACKAGE = Glib::Param::String

+=for position post_hierarchy
+
+=head1 HIERARCHY
+
+ Glib::ParamSpec
+ +----Glib::Param::String
+
+=cut
+
=for see_also Glib::ParamSpec
=cut

@@ -1032,6 +1111,15 @@

MODULE = Glib::ParamSpec PACKAGE = Glib::Param::Unichar

+=for position post_hierarchy
+
+=head1 HIERARCHY
+
+ Glib::ParamSpec
+ +----Glib::Param::Unichar
+
+=cut
+
=for see_also Glib::ParamSpec
=cut

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/GSignal.xs new/Glib-1.200/GSignal.xs
--- old/Glib-1.183/GSignal.xs 2008-05-31 20:27:16.000000000 +0200
+++ new/Glib-1.200/GSignal.xs 2008-05-31 20:25:50.000000000 +0200
@@ -16,7 +16,7 @@
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
*
- * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GSignal.xs,v 1.31.2.1
2008/05/31 18:27:16 kaffeetisch Exp $
+ * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GSignal.xs,v 1.32 2008/05/31
18:25:50 kaffeetisch Exp $
*/

=head2 GSignal
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/GType.xs new/Glib-1.200/GType.xs
--- old/Glib-1.183/GType.xs 2008-06-01 15:43:16.000000000 +0200
+++ new/Glib-1.200/GType.xs 2008-08-23 23:07:32.000000000 +0200
@@ -16,7 +16,7 @@
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
*
- * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GType.xs,v 1.90 2008/05/22
21:23:30 kaffeetisch Exp $
+ * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GType.xs,v 1.94 2008/08/23
21:07:32 kaffeetisch Exp $
*/

=head2 GType / GEnum / GFlags
@@ -399,7 +399,7 @@
if (++vals && vals->value_nick)
sv_catpv (r, ", ");
}
- croak ("FATAL: invalid flags %s value %s, expecting: %s",
+ croak ("FATAL: invalid %s value %s, expecting: %s",
g_type_name (type), val_p, SvPV_nolen (r));

/* not reached */
@@ -430,7 +430,7 @@
if (SvPOK (val))
return gperl_convert_flag_one (type, SvPV_nolen (val));

- croak ("FATAL: invalid flags %s value %s, expecting a string scalar or
an arrayref of strings",
+ croak ("FATAL: invalid %s value %s, expecting a string scalar or an
arrayref of strings",
g_type_name (type), SvPV_nolen (val));
return 0; /* not reached */
}
@@ -2678,6 +2678,35 @@
=cut

=for apidoc
+Create a new flags object with given bits. This is for use from a
+subclass, it's not possible to create a C<Glib::Flags> object as such.
+For example,
+
+ my $f1 = Glib::ParamFlags->new ('readable');
+ my $f2 = Glib::ParamFlags->new (['readable','writable']);
+
+An object like this can then be used with the overloaded operators.
+=cut
+SV *
+new (const char *class, SV *a)
+ PREINIT:
+ GType gtype;
+ CODE:
+ gtype = gperl_fundamental_type_from_package (class);
+ if (! gtype || ! g_type_is_a (gtype, G_TYPE_FLAGS)) {
+ croak ("package %s is not registered with the GLib type system "
+ "as a flags type",
+ class);
+ }
+ if (gtype == G_TYPE_FLAGS) {
+ croak ("cannot create Glib::Flags (only subclasses)");
+ }
+ RETVAL = gperl_convert_back_flags
+ (gtype, gperl_convert_flags (gtype, a));
+ OUTPUT:
+ RETVAL
+
+=for apidoc
=for arg b (SV*)
=for arg swap (integer)
=cut
@@ -2744,7 +2773,7 @@
RETVAL

SV *
-union (SV *a, SV *b, int swap)
+union (SV *a, SV *b, SV *swap)
ALIAS:
sub = 1
intersect = 2
@@ -2758,8 +2787,8 @@

package = sv_reftype (SvRV (a), TRUE);
gtype = gperl_fundamental_type_from_package (package);
- a_ = gperl_convert_flags (gtype, swap ? b : a);
- b_ = gperl_convert_flags (gtype, swap ? a : b);
+ a_ = gperl_convert_flags (gtype, SvTRUE (swap) ? b : a);
+ b_ = gperl_convert_flags (gtype, SvTRUE (swap) ? a : b);

switch (ix) {
case 0: a_ |= b_; break;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/GUtils.xs new/Glib-1.200/GUtils.xs
--- old/Glib-1.183/GUtils.xs 2007-12-16 19:39:56.000000000 +0100
+++ new/Glib-1.200/GUtils.xs 2008-06-01 15:31:56.000000000 +0200
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
- * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GUtils.xs,v 1.10 2007/09/15
14:10:12 kaffeetisch Exp $
+ * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GUtils.xs,v 1.11 2008/06/01
13:31:56 kaffeetisch Exp $
*/
#include "gperl.h"

@@ -255,6 +255,24 @@
## Look for an executable in PATH, following execvp() rules
#gchar* g_find_program_in_path (const gchar *program);

+=for apidoc __function__
+Return a string describing the given errno value, like "No such file
+or directory" for ENOENT. This is translated into the user's
+preferred language and is a utf8 wide-char string (unlike a $!
+string (L<perlvar>) or POSIX::strerror (L<POSIX>) which are locale
+codeset bytes).
+=cut
+## note the returned string can be overwritten by the next call, so must copy
+const gchar *g_strerror (gint err);
+
+=for apidoc __function__
+Return a string describing the given signal number, like "Segmentation
+violation" for SIGSEGV. This is translated into the user's preferred
+language and is a utf8 wide-char string.
+=cut
+## note the returned string can be overwritten by the next call, so must copy
+const gchar *g_strsignal (gint signum);
+
###
### Version information
###
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/GValue.xs new/Glib-1.200/GValue.xs
--- old/Glib-1.183/GValue.xs 2008-05-23 00:02:01.000000000 +0200
+++ new/Glib-1.200/GValue.xs 2008-09-06 15:28:30.000000000 +0200
@@ -16,7 +16,7 @@
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
*
- * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GValue.xs,v 1.22 2008/01/07
18:50:07 kaffeetisch Exp $
+ * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GValue.xs,v 1.24 2008/09/06
13:28:30 kaffeetisch Exp $
*/

=head2 GValue
@@ -244,6 +244,11 @@
FALSE);

case G_TYPE_PARAM:
+ /* can have NULL here fetching object properties of
+ * type G_TYPE_PARAM with no value set yet, or from
+ * ->get_default_value of such a
+ * property. newSVGParamSpec handles NULL by returning
+ * undef. */
return newSVGParamSpec (g_value_get_param (value));

case G_TYPE_OBJECT:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/Makefile.PL new/Glib-1.200/Makefile.PL
--- old/Glib-1.183/Makefile.PL 2008-05-23 00:02:02.000000000 +0200
+++ new/Glib-1.200/Makefile.PL 2008-09-20 15:01:26.000000000 +0200
@@ -1,5 +1,5 @@
#
-# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/Makefile.PL,v 1.77 2008/03/30
17:26:03 kaffeetisch Exp $
+# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/Makefile.PL,v 1.79 2008/09/20
13:01:26 kaffeetisch Exp $
#

BEGIN { require 5.008; }
@@ -169,7 +169,7 @@
This is an unstable development release of Glib. The API is not
frozen and things are subject to change at any time. Report any
bugs to gtk-perl-list AT gnome DOT org as soon as possible.
- Please use the 1.16x series for important work.
+ Please use the 1.18x series for important work.

WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
__EOW__
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/MakeHelper.pm new/Glib-1.200/MakeHelper.pm
--- old/Glib-1.183/MakeHelper.pm 2008-05-23 00:02:02.000000000 +0200
+++ new/Glib-1.200/MakeHelper.pm 2008-08-31 21:24:23.000000000 +0200
@@ -1,5 +1,5 @@
#
-# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/MakeHelper.pm,v 1.44
2008/03/30 17:21:39 kaffeetisch Exp $
+# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/MakeHelper.pm,v 1.45
2008/08/31 19:24:23 kaffeetisch Exp $
#

package Glib::MakeHelper;
@@ -435,7 +435,7 @@
\$(NOECHO) \$(ECHO) Creating POD index...
\$(NOECHO) $^X -e "print qq(\\n=head1 NAME\\n\\n\$(NAME) - API
Reference Pod Index\\n\\n=head1 PAGES\\n\\n=over\\n\\n)" \\
> \$(INST_LIB)/\$(FULLEXT)/index.pod
- \$(NOECHO) $^X -nae "print qq(=item L<\$\$F[1]>\\n\\n);" <
build/podindex >> \$(INST_LIB)/\$(FULLEXT)/index.pod
+ \$(NOECHO) $^X -ne "print q(=item L<) . (split q( ))[1] . qq(>\\n\\n);"
< build/podindex >> \$(INST_LIB)/\$(FULLEXT)/index.pod
\$(NOECHO) $^X -e "print qq(=back\\n\\n);" >>
\$(INST_LIB)/\$(FULLEXT)/index.pod
__EOM__
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/MANIFEST new/Glib-1.200/MANIFEST
--- old/Glib-1.183/MANIFEST 2008-06-02 10:48:01.000000000 +0200
+++ new/Glib-1.200/MANIFEST 2008-09-20 15:02:08.000000000 +0200
@@ -57,6 +57,7 @@
t/filename.t
t/g.t
t/h.t
+t/lazy-loader.t
t/make_helper.t
t/signal_emission_hooks.t
t/signal_query.t
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/META.yml new/Glib-1.200/META.yml
--- old/Glib-1.183/META.yml 2008-06-02 10:48:01.000000000 +0200
+++ new/Glib-1.200/META.yml 2008-09-20 15:02:07.000000000 +0200
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Glib
-version: 1.183
+version: 1.200
abstract: Perl wrappers for the GLib utility and Object libraries
license: ~
author: ~
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/NEWS new/Glib-1.200/NEWS
--- old/Glib-1.183/NEWS 2008-06-02 10:39:28.000000000 +0200
+++ new/Glib-1.200/NEWS 2008-09-20 14:58:09.000000000 +0200
@@ -1,3 +1,46 @@
+Overview of changes in Glib 1.200
+=================================
+
+ Since 1.18x (the previous stable series)
+ ----------------------------------------
+ * Add Glib::Flags::new, a constructor for flags objects.
+ * Add Glib::strerror and Glib::strsignal.
+ * Increase the robustness of stack handling in Glib::Object::get, of
+ Glib::ParamSpec handling in general, of overloaded Glib::Flags operators,
+ and of the Glib::Object lazy-loader.
+
+ Since 1.193
+ -----------
+ * Update the TODO file.
+
+Overview of changes in Glib 1.193
+=================================
+
+* Make the stack handling in Glib::Object::get more robust.
+* Make the Glib::ParamSpec constructors return undef on failure.
+* Make sure the Glib::Object lazy loader can handle being invoked on packages
+ which aren't registered with the Glib type system.
+* The recent fix for user data handling in callback invocation involved a
+ change of semantics: modifying the user data directly had no effect anymore.
+ Change that back while still fixing the original bug.
+
+Overview of changes in Glib 1.192
+=================================
+
+* Fix the POD index page generation.
+
+Overview of changes in Glib 1.191
+=================================
+
+* Make overloaded Glib::Flags operators more robust.
+* Handle unset GParamSpecs gracefully.
+
+Overview of changes in Glib 1.190
+=================================
+
+* Add Glib::Flags::new, a constructor for flags objects.
+* Add Glib::strerror and Glib::strsignal.
+
Overview of changes in Glib 1.183
=================================

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/README new/Glib-1.200/README
--- old/Glib-1.183/README 2008-06-02 10:40:45.000000000 +0200
+++ new/Glib-1.200/README 2008-09-20 15:01:26.000000000 +0200
@@ -1,4 +1,4 @@
-Glib version 1.183
+Glib version 1.200
==================

This module provides perl access to Glib and GLib's GObject libraries.
@@ -102,4 +102,4 @@
with this library; if not, write to the Free Software Foundation, Inc., 59
Temple Place - Suite 330, Boston, MA 02111-1307 USA.

-# $Id: README,v 1.83.2.1 2008/06/02 08:40:45 kaffeetisch Exp $
+# $Id: README,v 1.88 2008/09/20 13:01:26 kaffeetisch Exp $
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/t/1.t new/Glib-1.200/t/1.t
--- old/Glib-1.183/t/1.t 2008-05-23 00:02:09.000000000 +0200
+++ new/Glib-1.200/t/1.t 2008-06-01 15:31:57.000000000 +0200
@@ -1,6 +1,6 @@
#!/usr/bin/perl

-# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/t/1.t,v 1.16 2008/03/30
17:11:27 kaffeetisch Exp $
+# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/t/1.t,v 1.17 2008/06/01
13:31:57 kaffeetisch Exp $
#
# Basic test for Glib fundamentals. make sure that the smoke does't get out,
# and test most of the procedural things in Glib's toplevel namespace.
@@ -13,7 +13,7 @@

#########################

-use Test::More tests => 24;
+use Test::More tests => 26;
BEGIN { use_ok('Glib') };

#########################
@@ -75,6 +75,9 @@

is (Glib::Markup::escape_text ("<gtk2-perl>"), "&lt;gtk2-perl&gt;");

+ok (defined Glib::strerror (2));
+ok (defined Glib::strsignal (11));
+
__END__

Copyright (C) 2003-2005 by the gtk2-perl team (see the file AUTHORS for the
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/t/2.t new/Glib-1.200/t/2.t
--- old/Glib-1.183/t/2.t 2008-05-23 00:02:10.000000000 +0200
+++ new/Glib-1.200/t/2.t 2008-08-31 18:54:18.000000000 +0200
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/t/2.t,v 1.9 2007/12/22
19:00:48 kaffeetisch Exp $
+# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/t/2.t,v 1.10 2008/08/03
16:01:14 kaffeetisch Exp $
#
# Really simple smoke tests for Glib::Object wrappers.
#
@@ -18,7 +18,7 @@

#########################

-my $obj = new Glib::Object "Glib::Object";
+my $obj = Glib::Object->new;
isa_ok ($obj, 'Glib::Object');

$obj->freeze_notify;
@@ -34,9 +34,9 @@
# that the magical hash wrappers work correctly, all in one convoluted
# test.

-$obj = new Glib::Object;
+$obj = Glib::Object->new;
isa_ok ($obj, 'Glib::Object');
-my $obj2 = new Glib::Object;
+my $obj2 = Glib::Object->new;
isa_ok ($obj, 'Glib::Object');
$obj2->{key} = 'val';
$obj->set_data (obj2 => $obj2->get_pointer);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/t/4.t new/Glib-1.200/t/4.t
--- old/Glib-1.183/t/4.t 2008-05-23 00:02:10.000000000 +0200
+++ new/Glib-1.200/t/4.t 2008-08-23 17:03:20.000000000 +0200
@@ -1,38 +1,61 @@
+#!/usr/bin/perl
#
# test Glib::Object derivation in Perl.
# derive from a C object in perl, and derive from a Perl object in perl.
# checks order of execution of initializers and finalizers, so the code
# gets a little hairy.
#
-print "1..17\n";
-
use strict;
use warnings;

-use Glib;
+use Glib qw(:constants);
+
+# From 7.t. Do we need a test helper class?
+sub ok($$;$) {
+ my($test, $num, $name) = @_;
+
+ my $out = $test ? "ok" : "not ok";
+ $out .= " $num" if $num;
+ $out .= " - $name" if defined $name;
+
+ print "$out\n";
+
+ return $test;
+}
+
+sub pass($;$) {
+ my($num, $name) = @_;
+ return ok(1, $num, $name);
+}

-print "ok 1\n";
+sub fail(;$) {
+ my($name) = @_;
+ return ok(0, 0, $name);
+}
+
+print "1..17\n";
+pass 1;

my $init_self;

sub Foo::INIT_INSTANCE {
$init_self = $_[0]*1;
- print "ok 2\n";
+ pass 2, 'Foo::INIT_INSTANCE';
}

sub Foo::FINALIZE_INSTANCE {
- print "ok 9\n";
+ pass 9, 'Foo::FINALIZE_INSTANCE'
}

my $setprop_self;

sub Foo::SET_PROPERTY {
$setprop_self = $_[0]*1;
- print "ok $_[2]\n";
+ pass $_[2], 'Foo::SET_PROPERTY';
}

sub Foo::GET_PROPERTY {
- print "ok 6\n";
+ pass 6, 'Foo::GET_PROPERTY';
6;
}

@@ -49,11 +72,11 @@
]);

sub Bar::INIT_INSTANCE {
- print "ok 3\n";
+ pass 3, 'Bar::INIT_INSTANCE';
}

sub Bar::FINALIZE_INSTANCE {
- print "ok 8\n";
+ pass 8, 'Bar::FINALIZE_INSTANCE';
}

Glib::Type->register (Foo::, Bar::,
@@ -66,29 +89,28 @@
{
# instantiate a child. we should get messages from both initializers.
my $bar = new Bar;
- use POSIX;
# make sure we can set parent properties on the child
$bar->set(some_string => 4);
- print $init_self != $setprop_self ? "not " : "", "ok 5\n";
- print $bar->get("some_string") != 6 ? "not " : "", "ok 7\n";
+ ok $init_self == $setprop_self, 5;
+ ok $bar->get("some_string") == 6, 7;
# should see messages from both finalizers here.
}

-print "ok 10\n";
+pass 10;

#
# ensure that any properties added to the subclass were only added to
# the subclass, and not the parent.
#
-print "".( defined Foo->find_property('some_string') ? "ok 11" : "not
ok")."\n";
-print "".(!defined Foo->find_property('number') ? "ok 12" : "not
ok")."\n";
-print "".( defined Bar->find_property('number') ? "ok 13" : "not
ok")."\n";
+ok defined Foo->find_property('some_string'), 11;
+ok !defined Foo->find_property('number'), 12;
+ok defined Bar->find_property('number'), 13;

my @fooprops = Foo->list_properties;
my @barprops = Bar->list_properties;

-print "".(@fooprops == 1 ? "ok 14" : "not ok")." - property count for
parent\n";
-print "".(@barprops == 2 ? "ok 15" : "not ok")." - property count for child\n";
+ok @fooprops == 1, 14, 'property count for parent';
+ok @barprops == 2, 15, 'property count for child';

my @ancestry = Glib::Type->list_ancestors ('Bar');
my $ancestry_ok = $ancestry[0] eq 'Bar' &&
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/t/5.t new/Glib-1.200/t/5.t
--- old/Glib-1.183/t/5.t 2006-10-17 21:56:32.000000000 +0200
+++ new/Glib-1.200/t/5.t 2008-09-06 14:51:56.000000000 +0200
@@ -8,8 +8,9 @@

use strict;
use warnings;
+use Test::More; # for eq_array

-print "1..9\n";
+print "1..10\n";

use Glib;

@@ -42,10 +43,17 @@
}

sub FINALIZE_INSTANCE {
- print "ok 8\n";
+ print "ok 9\n";
+}
+
+sub grow_the_stack {
+ 1 .. 500;
}

sub GET_PROPERTY {
+ # grow the stack to trigger reallocation and movement of it in order to test
+ # that Glib::Object->get handles the stack correctly
+ my @list = grow_the_stack();
77;
}

@@ -79,9 +87,13 @@
# set should have bailed out before setting some_string to bar.
# cannot use get() here, because GET_PROPERTY always returns 77.
print $my->{some_string} ne 'foo' ? "not " : "", "ok 7\n";
+
+ # verify that fetching multiple properties doesn't corrupt the stack.
+ print eq_array([$my->get("some_string", "some_string")], [77, 77])
+ ? "" : "not ", "ok 8\n";
}

-print "ok 9\n";
+print "ok 10\n";



diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/t/c.t new/Glib-1.200/t/c.t
--- old/Glib-1.183/t/c.t 2008-05-23 00:02:10.000000000 +0200
+++ new/Glib-1.200/t/c.t 2008-07-13 17:10:17.000000000 +0200
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# vim: set filetype=perl :
#
-# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/t/c.t,v 1.11 2008/05/22
21:23:44 kaffeetisch Exp $
+# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/t/c.t,v 1.13 2008/07/13
15:10:17 kaffeetisch Exp $
#

#
@@ -13,11 +13,45 @@

#########################

-use Test::More tests => 23;
+use Test::More tests => 34;
BEGIN { use_ok('Glib') };

#########################

+#
+# Flags basics
+#
+
+my $f = Glib::ParamFlags->new (['readable', 'writable']); # with array
+isa_ok ($f, 'Glib::Flags');
+isa_ok ($f, 'Glib::ParamFlags');
+ok ($f == ['readable', 'writable'], "value");
+
+$f = Glib::ParamFlags->new ('readable'); # with plain string
+isa_ok ($f, 'Glib::Flags');
+isa_ok ($f, 'Glib::ParamFlags');
+ok ($f == ['readable'], "value");
+
+my $g = Glib::ParamFlags->new ($f + 'writable'); # from another
+isa_ok ($g, 'Glib::ParamFlags');
+ok ($g >= $f);
+
+$@ = undef;
+eval { my $h = Glib::Flags->new (['readable']); };
+ok ($@, "Will croak on trying to create plain old Glib::Flags");
+
+{
+ my $f = Glib::ParamFlags->new (['readable']);
+ my $g = $f;
+ $g += 'writable';
+ ok ($g == ['readable', 'writable'],
+ "overloaded +=");
+ ok ($f == ['readable'],
+ "overloaded += leaves original unchanged");
+}
+
+#########################
+
$@ = undef;
eval {
Glib::Type->register_enum ('TestEnum',
@@ -170,6 +204,10 @@

package main;

+#
+# App-registered flags.
+#
+
my $obj = Tester->new;
$obj->sig1 ('value-two', ['value-one', 'value-two']);

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/t/e.t new/Glib-1.200/t/e.t
--- old/Glib-1.183/t/e.t 2006-10-17 21:56:32.000000000 +0200
+++ new/Glib-1.200/t/e.t 2008-09-06 15:22:51.000000000 +0200
@@ -1,9 +1,10 @@
+#!/usr/bin/perl
#
# ParamSpec stuff.
#
use strict;
use Glib ':constants';
-use Test::More tests => 231;
+use Test::More tests => 232;

# first register some types with which to play below.

@@ -204,3 +205,13 @@
foreach (@params) {
is ($_->get_owner_type, 'Bar', ref($_)." owner type after adding");
}
+
+
+
+#
+# verify that NULL param specs are handled gracefully
+#
+
+my $object = Bar->new;
+my $x = $object->get ('param_spec');
+is ($x, undef);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/t/lazy-loader.t
new/Glib-1.200/t/lazy-loader.t
--- old/Glib-1.183/t/lazy-loader.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Glib-1.200/t/lazy-loader.t 2008-09-07 12:23:25.000000000 +0200
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+#
+# Test some aspects of the lazy loader
+#
+
+use strict;
+use warnings;
+use Glib;
+use Test::More tests => 1;
+
+SKIP: {
+ skip 'need Glib::InitiallyUnowned', 1
+ unless Glib->CHECK_VERSION(2, 10, 0);
+
+ # Setup a strange hierarchy that tests whether the lazy loader can deal with
+ # being invoked on a package that only indirectly inherits from a registered
+ # package.
+ @NotThere::ISA = ();
+ @NotHere::ISA = ();
+ @Foo::ISA = qw/NotThere Glib::InitiallyUnowned/;
+ @Bar::ISA = qw/NotHere Foo/;
+ ok (Bar->isa (qw/Glib::Object/),
+ 'the lazy loader correctly set up the hierarchy');
+}
+
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/Glib-1.183/TODO new/Glib-1.200/TODO
--- old/Glib-1.183/TODO 2006-10-17 21:56:32.000000000 +0200
+++ new/Glib-1.200/TODO 2008-09-20 14:49:52.000000000 +0200
@@ -1,11 +1,5 @@
-- documentation generation:
- - hush things up a bit, we don't need so much status info
- perhaps there should be an env var to enable these messages, or a
- "doc lint" tool.
-
- the ability to create new GSources in Perl could be handy, and wouldn't be
hard to implement (a hash in place of GSourceFuncs).
-
- GEnum type for G_PRIORITY_VALUES?
- can't implement g_idle_remove_by_data because ... well, how would you
search for the data value?


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages