[perl-Gtk2] Be compatible with perl 5.8.0
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Be compatible with perl 5.8.0
- Date: Sat, 7 Jan 2012 16:51:51 +0000 (UTC)
commit 1b7a6f425194fc48e2a77e6fdcd1e8af98ed79ae
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Sat Jan 7 17:51:29 2012 +0100
Be compatible with perl 5.8.0
In particular, provide a definition of the Newx() macro if needed, and
don't rely on code block signatures working.
https://bugzilla.gnome.org/show_bug.cgi?id=666227
lib/Gtk2/TestHelper.pm | 4 ++--
xs/GdkPixbuf.xs | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/lib/Gtk2/TestHelper.pm b/lib/Gtk2/TestHelper.pm
index 88c1f32..88acb71 100644
--- a/lib/Gtk2/TestHelper.pm
+++ b/lib/Gtk2/TestHelper.pm
@@ -86,7 +86,7 @@ sub run_main (;&) {
}
sub ok_idle ($;$) {
my ($testsub, $test_name) = @_;
- run_main {
+ run_main sub {
# 0 Test::More::ok
# 1 this block's ok() call
# 2 idle callback in run_main
@@ -100,7 +100,7 @@ sub ok_idle ($;$) {
}
sub is_idle ($$;$) {
my ($asub, $b, $test_name) = @_;
- run_main {
+ run_main sub {
local $Test::Builder::Level = 6; # see ok_idle()
is ($asub->(), $b, $test_name);
}
diff --git a/xs/GdkPixbuf.xs b/xs/GdkPixbuf.xs
index ed9df1c..fac8353 100644
--- a/xs/GdkPixbuf.xs
+++ b/xs/GdkPixbuf.xs
@@ -22,6 +22,11 @@
#define GDK_PIXBUF_ENABLE_BACKEND 1 /* for gdk_pixbuf_set_option() prototype */
#include "gtk2perl.h"
+/* for backwards-compatibility: */
+#ifndef Newx
+# define Newx(v,n,t) New(0,v,n,t)
+#endif
+
static void
gtk2perl_pixbuf_destroy_notify (guchar * pixels,
gpointer data)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]