[evince/wip/bug654832: 8/18] [libdocument] Don't export EvModule symbols



commit 889ca3908aa2d9421cb768253a397aaefc0dab8a
Author: Christian Persch <chpe gnome org>
Date:   Sat Feb 13 20:49:56 2010 +0100

    [libdocument] Don't export EvModule symbols
    
    EvModule is private API; don't export it.

 libdocument/ev-document-factory.c |    6 +++---
 libdocument/ev-module.c           |   11 ++++++-----
 libdocument/ev-module.h           |   14 +++++++-------
 3 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/libdocument/ev-document-factory.c b/libdocument/ev-document-factory.c
index a8030b3..bb9064c 100644
--- a/libdocument/ev-document-factory.c
+++ b/libdocument/ev-document-factory.c
@@ -96,7 +96,7 @@ ev_document_factory_new_document_for_mime_type (const gchar *mime_type)
                 gchar *path;
 
                 path = g_module_build_path (backends_dir(), info->module_name);
-                info->module = G_TYPE_MODULE (ev_module_new (path, info->resident));
+                info->module = G_TYPE_MODULE (_ev_module_new (path, info->resident));
                 g_free (path);
         }
 
@@ -112,7 +112,7 @@ ev_document_factory_new_document_for_mime_type (const gchar *mime_type)
                 return NULL;
         }
 
-        document = EV_DOCUMENT (ev_module_new_object (EV_MODULE (info->module)));
+        document = EV_DOCUMENT (_ev_module_new_object (EV_MODULE (info->module)));
         g_type_module_unuse (info->module);
 
         return document;
@@ -132,7 +132,7 @@ ev_document_factory_get_backend_for_document (EvDocument *document)
                 if (!info->module)
                         continue;
 
-                type_id = ev_module_get_object_type (EV_MODULE (info->module));
+                type_id = _ev_module_get_object_type (EV_MODULE (info->module));
 
                 if (G_TYPE_CHECK_INSTANCE_TYPE (document, type_id)) {
                         return info;
diff --git a/libdocument/ev-module.c b/libdocument/ev-module.c
index 330da2c..8721c47 100644
--- a/libdocument/ev-module.c
+++ b/libdocument/ev-module.c
@@ -65,6 +65,7 @@ typedef GType (*EvModuleRegisterFunc) (GTypeModule *);
 static void ev_module_init       (EvModule *action);
 static void ev_module_class_init (EvModuleClass *class);
 
+#define ev_module_get_type _ev_module_get_type
 G_DEFINE_TYPE (EvModule, ev_module, G_TYPE_TYPE_MODULE)
 
 static gboolean
@@ -125,7 +126,7 @@ ev_module_unload (GTypeModule *gmodule)
 }
 
 const gchar *
-ev_module_get_path (EvModule *module)
+_ev_module_get_path (EvModule *module)
 {
         g_return_val_if_fail (EV_IS_MODULE (module), NULL);
 
@@ -133,7 +134,7 @@ ev_module_get_path (EvModule *module)
 }
 
 GObject *
-ev_module_new_object (EvModule *module)
+_ev_module_new_object (EvModule *module)
 {
 	g_return_val_if_fail (EV_IS_MODULE (module), NULL);
 	
@@ -144,7 +145,7 @@ ev_module_new_object (EvModule *module)
 }
 
 GType
-ev_module_get_object_type (EvModule *module)
+_ev_module_get_object_type (EvModule *module)
 {
 	g_return_val_if_fail (EV_IS_MODULE (module), 0);
 
@@ -179,8 +180,8 @@ ev_module_class_init (EvModuleClass *class)
 }
 
 EvModule *
-ev_module_new (const gchar *path,
-	       gboolean     resident)
+_ev_module_new (const gchar *path,
+                gboolean     resident)
 {
         EvModule *result;
 
diff --git a/libdocument/ev-module.h b/libdocument/ev-module.h
index 8ac3362..9b85107 100644
--- a/libdocument/ev-module.h
+++ b/libdocument/ev-module.h
@@ -49,7 +49,7 @@
 
 G_BEGIN_DECLS
 
-#define EV_TYPE_MODULE            (ev_module_get_type ())
+#define EV_TYPE_MODULE            (_ev_module_get_type ())
 #define EV_MODULE(obj)		  (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_MODULE, EvModule))
 #define EV_MODULE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_MODULE, EvModuleClass))
 #define EV_IS_MODULE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_MODULE))
@@ -58,16 +58,16 @@ G_BEGIN_DECLS
 
 typedef struct _EvModule EvModule;
 
-GType        ev_module_get_type        (void) G_GNUC_CONST;
+GType        _ev_module_get_type        (void) G_GNUC_CONST;
 
-EvModule    *ev_module_new             (const gchar *path,
-					gboolean     resident);
+EvModule    *_ev_module_new             (const gchar *path,
+                                        gboolean     resident);
 
-const gchar *ev_module_get_path        (EvModule    *module);
+const gchar *_ev_module_get_path        (EvModule    *module);
 
-GObject     *ev_module_new_object      (EvModule    *module);
+GObject     *_ev_module_new_object      (EvModule    *module);
 
-GType        ev_module_get_object_type (EvModule    *module);
+GType        _ev_module_get_object_type (EvModule    *module);
 
 G_END_DECLS
 



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