[at-spi2-core] Clean up names of private functions



commit d8edc4a2168e9d8f118bf7d56ad5c793f1e8d763
Author: Mike Gorse <mgorse novell com>
Date:   Tue Jul 26 20:34:25 2011 -0500

    Clean up names of private functions
    
    If a function is non-static and not intended to be public, then precede
    its name with an _.

 atspi/atspi-accessible.c              |    2 +-
 atspi/atspi-device-listener-private.h |    3 ---
 atspi/atspi-device-listener.c         |    5 +----
 atspi/atspi-event-listener-private.h  |    2 +-
 atspi/atspi-event-listener.c          |    2 +-
 atspi/atspi-hyperlink.c               |    4 +---
 atspi/atspi-hyperlink.h               |    2 +-
 atspi/atspi-misc-private.h            |    4 ++--
 atspi/atspi-misc.c                    |   10 ++++------
 9 files changed, 12 insertions(+), 22 deletions(-)
---
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c
index cff761e..29e4083 100644
--- a/atspi/atspi-accessible.c
+++ b/atspi/atspi-accessible.c
@@ -1244,7 +1244,7 @@ AtspiHyperlink *
 atspi_accessible_get_hyperlink (AtspiAccessible *accessible)
 {
   return (_atspi_accessible_is_a (accessible, atspi_interface_hyperlink) ?
-          atspi_hyperlink_new (accessible->parent.app, accessible->parent.path) : NULL);
+          _atspi_hyperlink_new (accessible->parent.app, accessible->parent.path) : NULL);
 }
 
 /**
diff --git a/atspi/atspi-device-listener-private.h b/atspi/atspi-device-listener-private.h
index 2c07f9e..471ca7a 100644
--- a/atspi/atspi-device-listener-private.h
+++ b/atspi/atspi-device-listener-private.h
@@ -32,7 +32,4 @@
 DBusHandlerResult _atspi_dbus_handle_DeviceEvent (DBusConnection *bus, DBusMessage *message, void *data);
 
 gchar *_atspi_device_listener_get_path (AtspiDeviceListener *listener);
-
-DBusHandlerResult
-atspi_dbus_handle_DeviceEvent (DBusConnection *bus, DBusMessage *message, void *data);
 #endif	/* _ATSPI_DEVICE_LISTENER_H_ */
diff --git a/atspi/atspi-device-listener.c b/atspi/atspi-device-listener.c
index 6f7d9cf..3843227 100644
--- a/atspi/atspi-device-listener.c
+++ b/atspi/atspi-device-listener.c
@@ -346,11 +346,8 @@ read_device_event_from_iter (DBusMessageIter *iter, AtspiDeviceEvent *event)
   event->is_text = is_text;
 }
 
-/*
- * atspi_dbus_handle_DeviceEvent: (skip)
- */
 DBusHandlerResult
-atspi_dbus_handle_DeviceEvent (DBusConnection *bus, DBusMessage *message, void *data)
+_atspi_dbus_handle_DeviceEvent (DBusConnection *bus, DBusMessage *message, void *data)
 {
   const char *path = dbus_message_get_path (message);
   int id;
diff --git a/atspi/atspi-event-listener-private.h b/atspi/atspi-event-listener-private.h
index 64828eb..1bf527d 100644
--- a/atspi/atspi-event-listener-private.h
+++ b/atspi/atspi-event-listener-private.h
@@ -34,5 +34,5 @@ DBusHandlerResult _atspi_dbus_handle_Event (DBusConnection *bus, DBusMessage *me
 
 void _atspi_send_event (AtspiEvent *e);
 
-DBusHandlerResult atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data);
+DBusHandlerResult _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data);
 #endif	/* _ATSPI_EVENT_LISTENER_H_ */
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c
index 61e1010..18cad17 100644
--- a/atspi/atspi-event-listener.c
+++ b/atspi/atspi-event-listener.c
@@ -772,7 +772,7 @@ _atspi_send_event (AtspiEvent *e)
 }
 
 DBusHandlerResult
-atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data)
+_atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data)
 {
   char *detail = NULL;
   const char *category = dbus_message_get_interface (message);
diff --git a/atspi/atspi-hyperlink.c b/atspi/atspi-hyperlink.c
index c2f3d5b..2397bba 100644
--- a/atspi/atspi-hyperlink.c
+++ b/atspi/atspi-hyperlink.c
@@ -37,13 +37,11 @@ atspi_hyperlink_class_init (AtspiHyperlinkClass *klass)
 }
 
 AtspiHyperlink *
-atspi_hyperlink_new (AtspiApplication *app, const gchar *path)
+_atspi_hyperlink_new (AtspiApplication *app, const gchar *path)
 {
   AtspiHyperlink *hyperlink;
   
   hyperlink = g_object_new (ATSPI_TYPE_HYPERLINK, NULL);
-  g_return_val_if_fail (hyperlink != NULL, NULL);
-
   hyperlink->parent.app = g_object_ref (app);
   hyperlink->parent.path = g_strdup (path);
 
diff --git a/atspi/atspi-hyperlink.h b/atspi/atspi-hyperlink.h
index 45acf87..2ef6058 100644
--- a/atspi/atspi-hyperlink.h
+++ b/atspi/atspi-hyperlink.h
@@ -54,7 +54,7 @@ struct _AtspiHyperlinkClass
 GType atspi_hyperlink_get_type (void); 
 
 AtspiHyperlink *
-atspi_hyperlink_new (AtspiApplication *app, const gchar *path);
+_atspi_hyperlink_new (AtspiApplication *app, const gchar *path);
 
 gint atspi_hyperlink_get_n_anchors (AtspiHyperlink *obj, GError **error);
 
diff --git a/atspi/atspi-misc-private.h b/atspi/atspi-misc-private.h
index 865ab5f..4498199 100644
--- a/atspi/atspi-misc-private.h
+++ b/atspi/atspi-misc-private.h
@@ -171,8 +171,8 @@ void _atspi_dbus_set_state (AtspiAccessible *accessible, DBusMessageIter *iter);
  * be from the #ATSPIAtspiError enumeration. See #GError for information on
  * error domains.
  */
-#define ATSPI_ERROR atspi_error_quark()
-GQuark atspi_error_quark (void);
+#define ATSPI_ERROR _atspi_error_quark()
+GQuark _atspi_error_quark (void);
 
 /**
  * AtspiError:
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 0a24f24..46616c3 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -262,9 +262,7 @@ ref_hyperlink (const char *app_name, const char *path)
   {
     return g_object_ref (hyperlink);
   }
-  hyperlink = atspi_hyperlink_new (app, path);
-  if (!hyperlink)
-    return NULL;
+  hyperlink = _atspi_hyperlink_new (app, path);
   g_hash_table_insert (app->hash, g_strdup (hyperlink->parent.path), hyperlink);
   /* TODO: This should be a weak ref */
   g_object_ref (hyperlink);	/* for the hash */
@@ -674,11 +672,11 @@ process_deferred_message (BusDataClosure *closure)
   if (type == DBUS_MESSAGE_TYPE_SIGNAL &&
       !strncmp (interface, "org.a11y.atspi.Event.", 21))
   {
-    atspi_dbus_handle_event (closure->bus, closure->message, closure->data);
+    _atspi_dbus_handle_event (closure->bus, closure->message, closure->data);
   }
   if (dbus_message_is_method_call (closure->message, atspi_interface_device_event_listener, "NotifyEvent"))
   {
-    atspi_dbus_handle_DeviceEvent (closure->bus,
+    _atspi_dbus_handle_DeviceEvent (closure->bus,
                                    closure->message, closure->data);
   }
   if (dbus_message_is_signal (closure->message, atspi_interface_cache, "AddAccessible"))
@@ -1254,7 +1252,7 @@ _atspi_dbus_set_state (AtspiAccessible *accessible, DBusMessageIter *iter)
 }
 
 GQuark
-atspi_error_quark (void)
+_atspi_error_quark (void)
 {
   return g_quark_from_static_string ("atspi_error");
 }



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