perl-Pango r14 - in trunk: . t xs
- From: tsch svn gnome org
- To: svn-commits-list gnome org
- Subject: perl-Pango r14 - in trunk: . t xs
- Date: Thu, 1 Jan 2009 16:52:39 +0000 (UTC)
Author: tsch
Date: Thu Jan 1 16:52:39 2009
New Revision: 14
URL: http://svn.gnome.org/viewvc/perl-Pango?rev=14&view=rev
Log:
Allow passing undef to Gtk2::Pango::Layout::set_attributes(). Patch by
Emmanuel Rodriguez. (RT #42079)
Modified:
trunk/ChangeLog
trunk/t/PangoLayout.t
trunk/xs/PangoLayout.xs
Modified: trunk/t/PangoLayout.t
==============================================================================
--- trunk/t/PangoLayout.t (original)
+++ trunk/t/PangoLayout.t Thu Jan 1 16:52:39 2009
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib qw(t/inc);
-use PangoTestHelper need_gtk => 1, tests => 72;
+use PangoTestHelper need_gtk => 1, tests => 73;
my $label = Gtk2::Label -> new("Bla");
my $context = $label -> create_pango_context();
@@ -57,7 +57,12 @@
my $attributes = $layout -> get_attributes();
isa_ok($attributes, "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: trunk/xs/PangoLayout.xs
==============================================================================
--- trunk/xs/PangoLayout.xs (original)
+++ trunk/xs/PangoLayout.xs Thu Jan 1 16:52:39 2009
@@ -190,10 +190,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]