Re: install problem: undefined symbol: gtk_binding_entry_skip



I think I'm to blame for not conditionalizing.  The two funcs could
still be combined when available.  I suppose the test script should be
updated too.

Index: xs/GtkBindings.xs
===================================================================
--- xs/GtkBindings.xs   (revision 2163)
+++ xs/GtkBindings.xs   (working copy)
@@ -371,22 +371,39 @@
        g_slist_free (binding_args);
        g_free (ap);
 
-## void gtk_binding_entry_remove (GtkBindingSet *binding_set,
-##                               guint keyval,
-##                               GdkModifierType modifiers);
+#if GTK_CHECK_VERSION (2, 12, 0)
+
+## gtk_binding_entry_remove() always exists, gtk_binding_entry_skip()
+## is new in 2.12
+##
+## void gtk_binding_entry_skip (GtkBindingSet *binding_set,
+##                             guint keyval,
+##                             GdkModifierType modifiers);
 void
-gtk_binding_entry_skip (binding_set, keyval, modifiers)
+gtk_binding_entry_remove (binding_set, keyval, modifiers)
        GtkBindingSet *binding_set
        guint keyval
        GdkModifierType modifiers
     ALIAS:
-       entry_remove = 1
+       entry_skip = 1
     CODE:
        if (ix == 0)
+               gtk_binding_entry_remove (binding_set, keyval, modifiers);
+       else
                gtk_binding_entry_skip (binding_set, keyval, modifiers);
-       else
-               gtk_binding_entry_remove (binding_set, keyval, modifiers);
 
+#else
+
+void
+gtk_binding_entry_remove (binding_set, keyval, modifiers)
+       GtkBindingSet *binding_set
+       guint keyval
+       GdkModifierType modifiers
+    CODE:
+       gtk_binding_entry_remove (binding_set, keyval, modifiers);
+
+#endif
+
 MODULE = Gtk2::BindingSet      PACKAGE = Gtk2::Object  PREFIX = gtk_
 
 =for apidoc
Index: t/GtkBindings.t
===================================================================
--- t/GtkBindings.t     (revision 2163)
+++ t/GtkBindings.t     (working copy)
@@ -341,8 +341,12 @@
 #-----------------------------------------------------------------------------
 # entry_skip()
 
-# basic invocation on object doesn't dispatch
-{
+SKIP: {
+  skip 'entry_skip() new in 2.12', 8
+    unless Gtk2->CHECK_VERSION(2, 12, 0);
+
+  # see that basic invocation on object doesn't dispatch
+  #
   my $skip_bindings = Gtk2::BindingSet->new ('entry_skip_test');
   my $keyval = Gtk2::Gdk->keyval_from_name('Return');
   my $modifiers = [];


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