From a49d9d1686089ce678e81a6c0d9e1a7bf16c4127 Mon Sep 17 00:00:00 2001 From: billh Date: Wed, 24 Mar 2004 13:56:52 +0000 Subject: [PATCH] Workaround/fix for bug #120659 - don't cast hyperlinks to ATK_OBJECT 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 | 5 +++++ libspi/hyperlink.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 000be5d..16657d9 100644 --- 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 diff --git a/libspi/hyperlink.c b/libspi/hyperlink.c index 7afc19d..d3da404 100644 --- a/libspi/hyperlink.c +++ b/libspi/hyperlink.c @@ -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; } -- 2.7.4