Workaround/fix for bug #120659 - don't cast hyperlinks to ATK_OBJECT
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 24 Mar 2004 13:56:52 +0000 (13:56 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 24 Mar 2004 13:56:52 +0000 (13:56 +0000)
when calling the spi_action_interface_new() constructor for them.
This is needed because of an anomaly in how hyperlink actions are
implemented.

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@640 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
libspi/hyperlink.c

index 000be5d..16657d9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,11 @@
        Bracketed some debug output in 
        conditionals, to avoid printing it in normal use.
        Fixes bug #136660.
+
+       * libspi/hyperlink.c:
+       Don't cast 'object' to ATK_OBJECT when constructing
+       an AtkAction interface for a hyperlink.
+       See discussion in bug #120659.
        
 2004-03-22  Bill Haneman <billh@gnome.org>
 
index 7afc19d..d3da404 100644 (file)
@@ -98,8 +98,14 @@ spi_hyperlink_new (AtkHyperlink *object)
    */
   if (ATK_IS_ACTION (object))
     {
+      /* 
+       * NOTE: we don't cast 'object' to ATK_OBJECT in the call to 
+       * spi_action_interface_new(), because of the above convention, 
+       * even though it means we may be violating the func prototype.
+       * See discussion in bugzilla bug #120659.
+       */
       bonobo_object_add_interface (bonobo_object (new_hyperlink),
-                                  BONOBO_OBJECT (spi_action_interface_new (ATK_OBJECT (object))));
+                                  BONOBO_OBJECT (spi_action_interface_new (object)));
     }
   return new_hyperlink;
 }