projects
/
platform
/
core
/
uifw
/
at-spi2-atk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Have value methods return 0 on failure rather than fail, as in original pyatspi
[platform/core/uifw/at-spi2-atk.git]
/
atk-adaptor
/
adaptors
/
hypertext-adaptor.c
diff --git
a/atk-adaptor/adaptors/hypertext-adaptor.c
b/atk-adaptor/adaptors/hypertext-adaptor.c
index
0bb4060
..
dbe1ffd
100644
(file)
--- a/
atk-adaptor/adaptors/hypertext-adaptor.c
+++ b/
atk-adaptor/adaptors/hypertext-adaptor.c
@@
-28,6
+28,8
@@
#include "common/spi-dbus.h"
#include "object.h"
#include "common/spi-dbus.h"
#include "object.h"
+#include "introspection.h"
+
static DBusMessage *
impl_GetNLinks (DBusConnection * bus, DBusMessage * message, void *user_data)
{
static DBusMessage *
impl_GetNLinks (DBusConnection * bus, DBusMessage * message, void *user_data)
{
@@
-64,7
+66,10
@@
impl_GetLink (DBusConnection * bus, DBusMessage * message, void *user_data)
return droute_invalid_arguments_error (message);
}
link = atk_hypertext_get_link (hypertext, linkIndex);
return droute_invalid_arguments_error (message);
}
link = atk_hypertext_get_link (hypertext, linkIndex);
- return spi_object_return_reference (message, ATK_OBJECT (hypertext));
+ /*The above line doesn't ref the link, and the next call is going to unref*/
+ if (link)
+ g_object_ref (link);
+ return spi_hyperlink_return_reference (message, link);
}
static DBusMessage *
}
static DBusMessage *
@@
-106,5
+111,5
@@
void
spi_initialize_hypertext (DRoutePath * path)
{
droute_path_add_interface (path,
spi_initialize_hypertext (DRoutePath * path)
{
droute_path_add_interface (path,
- SPI_DBUS_INTERFACE_HYPERTEXT, methods, NULL);
+ SPI_DBUS_INTERFACE_HYPERTEXT,
spi_org_a11y_atspi_Hypertext,
methods, NULL);
};
};