Added docs for SPI_freeString, and used it to stop memory leak of strings
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_hypertext.c
index c9a65ff..2c8128c 100644 (file)
@@ -1,3 +1,5 @@
+#include <cspi/spi-private.h>
+
 /**
  * AccessibleHypertext_ref:
  * @obj: a pointer to the #AccessibleHypertext object on which to operate.
@@ -12,7 +14,7 @@
 int
 AccessibleHypertext_ref (AccessibleHypertext *obj)
 {
-  Accessibility_Hypertext_ref (*obj, &ev);
+  cspi_object_ref (obj);
   return 0;
 }
 
@@ -31,7 +33,7 @@ AccessibleHypertext_ref (AccessibleHypertext *obj)
 int
 AccessibleHypertext_unref (AccessibleHypertext *obj)
 {
-  Accessibility_Hypertext_unref (*obj, &ev);
+  cspi_object_unref (obj);
   return 0;
 }
 
@@ -55,7 +57,7 @@ long
 AccessibleHypertext_getNLinks (AccessibleHypertext *obj)
 {
   return (long)
-    Accessibility_Hypertext_getNLinks (*obj, &ev);
+    Accessibility_Hypertext_getNLinks (CSPI_OBJREF (obj), cspi_ev ());
 }
 
 
@@ -74,8 +76,8 @@ AccessibleHypertext_getLink (AccessibleHypertext *obj,
                              long int linkIndex)
 {
   return (AccessibleHyperlink *)
-    Accessibility_Hypertext_getLink (*obj,
-                                    (CORBA_long) linkIndex, &ev);
+    Accessibility_Hypertext_getLink (CSPI_OBJREF (obj),
+                                    (CORBA_long) linkIndex, cspi_ev ());
 }
 
 
@@ -97,8 +99,8 @@ AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
                                   long int characterOffset)
 {
   return (long)
-    Accessibility_Hypertext_getLinkIndex (*obj,
-                                         (CORBA_long) characterOffset, &ev);
+    Accessibility_Hypertext_getLinkIndex (CSPI_OBJREF (obj),
+                                         (CORBA_long) characterOffset, cspi_ev ());
 }