Clean up names of private functions
authorMike Gorse <mgorse@novell.com>
Wed, 27 Jul 2011 01:34:25 +0000 (20:34 -0500)
committerMike Gorse <mgorse@novell.com>
Wed, 27 Jul 2011 01:34:25 +0000 (20:34 -0500)
If a function is non-static and not intended to be public, then precede
its name with an _.

atspi/atspi-accessible.c
atspi/atspi-device-listener-private.h
atspi/atspi-device-listener.c
atspi/atspi-event-listener-private.h
atspi/atspi-event-listener.c
atspi/atspi-hyperlink.c
atspi/atspi-hyperlink.h
atspi/atspi-misc-private.h
atspi/atspi-misc.c

index cff761e..29e4083 100644 (file)
@@ -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);
 }
 
 /**
index 2c07f9e..471ca7a 100644 (file)
@@ -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_ */
index 6f7d9cf..3843227 100644 (file)
@@ -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;
index 64828eb..1bf527d 100644 (file)
@@ -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_ */
index 61e1010..18cad17 100644 (file)
@@ -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);
index c2f3d5b..2397bba 100644 (file)
@@ -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);
 
index 45acf87..2ef6058 100644 (file)
@@ -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);
 
index 865ab5f..4498199 100644 (file)
@@ -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:
index 0a24f24..46616c3 100644 (file)
@@ -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");
 }