[perl-Gtk3] Gtk3::Gdk::Pixbuf::new_from_inline: do not take a copy_pixels argument
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk3] Gtk3::Gdk::Pixbuf::new_from_inline: do not take a copy_pixels argument
- Date: Tue, 15 Sep 2015 19:04:59 +0000 (UTC)
commit c95b8c7ce22faf63ccf50d5229caeff7b79f8aae
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Tue Sep 15 21:00:47 2015 +0200
Gtk3::Gdk::Pixbuf::new_from_inline: do not take a copy_pixels argument
It needs to be true for correct memory management.
lib/Gtk3.pm | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/lib/Gtk3.pm b/lib/Gtk3.pm
index 959b9cb..04926cb 100644
--- a/lib/Gtk3.pm
+++ b/lib/Gtk3.pm
@@ -1927,26 +1927,29 @@ sub Gtk3::Gdk::Pixbuf::new_from_data {
undef, undef);
}
+=item * C<Gtk3::Gdk::Pixbuf::new_from_inline> does not take a C<copy_pixels>
+argument. It is always set to TRUE for correct memory management.
+
+=cut
+
sub Gtk3::Gdk::Pixbuf::new_from_inline {
- my ($class, $data, $copy_pixels) = @_;
- $copy_pixels = Glib::TRUE unless defined $copy_pixels;
+ my ($class, $data) = @_;
return Glib::Object::Introspection->invoke (
$_GDK_PIXBUF_BASENAME, 'Pixbuf', 'new_from_inline',
- $class, _unpack_unless_array_ref ($data), $copy_pixels);
+ $class, _unpack_unless_array_ref ($data), Glib::TRUE); # always copy pixels
}
+=item * C<Gtk3::Gdk::Pixbuf::new_from_xpm_data> also accepts a list of XPM
+lines.
+
+=cut
+
sub Gtk3::Gdk::Pixbuf::new_from_xpm_data {
- my ($class, @data) = @_;
- my $real_data;
- {
- local $@;
- $real_data = (@data == 1 && eval { @{$data[0]} })
- ? $data[0]
- : \ data;
- }
+ my ($class, @rest) = @_;
+ my $data = _rest_to_ref (\ rest);
return Glib::Object::Introspection->invoke (
$_GDK_PIXBUF_BASENAME, 'Pixbuf', 'new_from_xpm_data',
- $class, $real_data);
+ $class, $data);
}
# Version check for the new annotations described in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]