perl-Gtk2 r2102 - in branches/stable-1-20: . t xs



Author: tsch
Date: Thu Jan  1 16:32:32 2009
New Revision: 2102
URL: http://svn.gnome.org/viewvc/perl-Gtk2?rev=2102&view=rev

Log:
Allow passing undef to Gtk2::Pango::Layout::set_attributes().  Patch by
Emmanuel Rodriguez.  (RT #42079)


Modified:
   branches/stable-1-20/ChangeLog
   branches/stable-1-20/t/PangoLayout.t
   branches/stable-1-20/xs/PangoLayout.xs

Modified: branches/stable-1-20/t/PangoLayout.t
==============================================================================
--- branches/stable-1-20/t/PangoLayout.t	(original)
+++ branches/stable-1-20/t/PangoLayout.t	Thu Jan  1 16:32:32 2009
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-use Gtk2::TestHelper tests => 71;
+use Gtk2::TestHelper tests => 72;
 
 # $Id$
 
@@ -57,7 +57,12 @@
 
 my $attributes = $layout -> get_attributes();
 isa_ok($attributes, "Gtk2::Pango::AttrList");
-$layout -> set_attributes($attributes);
+
+my $copy = $attributes -> copy();
+$layout -> set_attributes(undef);
+is($layout -> get_attributes(), undef);
+
+$layout -> set_attributes($copy);
 
 SKIP: {
   skip("[sg]et_auto_dir are new in 1.3.5", 1)

Modified: branches/stable-1-20/xs/PangoLayout.xs
==============================================================================
--- branches/stable-1-20/xs/PangoLayout.xs	(original)
+++ branches/stable-1-20/xs/PangoLayout.xs	Thu Jan  1 16:32:32 2009
@@ -192,10 +192,10 @@
 void
 pango_layout_set_attributes (layout, attrs)
 	PangoLayout *layout
-	PangoAttrList *attrs
+	PangoAttrList_ornull *attrs
 
 ##  PangoAttrList *pango_layout_get_attributes (PangoLayout *layout) 
-PangoAttrList *
+PangoAttrList_ornull *
 pango_layout_get_attributes (layout)
 	PangoLayout *layout
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]