[evolution] Hide enchant dependency from public headers



commit a55165db992b5a464fc988d7152e771294bebbbe
Author: Milan Crha <mcrha redhat com>
Date:   Thu Feb 8 18:55:39 2018 +0100

    Hide enchant dependency from public headers
    
    There is no real need to expose the dependency and with the change
    of the enachant version it could be problematic to forward the right
    enchant include folder to the library user, thus it's easier to just
    hide the dependency.

 src/e-util/e-spell-checker.c    |    4 +++-
 src/e-util/e-spell-checker.h    |    3 ++-
 src/e-util/e-spell-dictionary.c |    4 +++-
 src/e-util/e-spell-dictionary.h |    3 +--
 4 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/e-util/e-spell-checker.c b/src/e-util/e-spell-checker.c
index fc5a0ff..5ae1fa6 100644
--- a/src/e-util/e-spell-checker.c
+++ b/src/e-util/e-spell-checker.c
@@ -18,6 +18,8 @@
 
 #include "evolution-config.h"
 
+#include <enchant.h>
+
 #include "e-spell-checker.h"
 #include "e-spell-dictionary.h"
 
@@ -386,7 +388,7 @@ e_spell_checker_ref_dictionary (ESpellChecker *checker,
  *
  * Returns: the #EnchantDict for @language_code, or %NULL
  **/
-EnchantDict *
+gpointer
 e_spell_checker_get_enchant_dict (ESpellChecker *checker,
                                   const gchar *language_code)
 {
diff --git a/src/e-util/e-spell-checker.h b/src/e-util/e-spell-checker.h
index 690401b..76bac68 100644
--- a/src/e-util/e-spell-checker.h
+++ b/src/e-util/e-spell-checker.h
@@ -71,7 +71,8 @@ guint         e_spell_checker_count_available_dicts
 ESpellDictionary *
                e_spell_checker_ref_dictionary  (ESpellChecker *checker,
                                                 const gchar *language_code);
-EnchantDict *  e_spell_checker_get_enchant_dict
+gpointer /* EnchantDict * */
+               e_spell_checker_get_enchant_dict
                                                (ESpellChecker *checker,
                                                 const gchar *language_code);
 gboolean       e_spell_checker_get_language_active
diff --git a/src/e-util/e-spell-dictionary.c b/src/e-util/e-spell-dictionary.c
index f4f8db9..a9e51f7 100644
--- a/src/e-util/e-spell-dictionary.c
+++ b/src/e-util/e-spell-dictionary.c
@@ -18,6 +18,8 @@
 
 #include "evolution-config.h"
 
+#include <enchant.h>
+
 #include "e-util-private.h"
 #include "e-spell-dictionary.h"
 #include "e-spell-checker.h"
@@ -437,7 +439,7 @@ e_spell_dictionary_init (ESpellDictionary *dictionary)
 
 ESpellDictionary *
 e_spell_dictionary_new (ESpellChecker *spell_checker,
-                        EnchantDict *enchant_dict)
+                        gpointer enchant_dict)
 {
        ESpellDictionary *dictionary;
 
diff --git a/src/e-util/e-spell-dictionary.h b/src/e-util/e-spell-dictionary.h
index 83b0fc4..1bf1bfa 100644
--- a/src/e-util/e-spell-dictionary.h
+++ b/src/e-util/e-spell-dictionary.h
@@ -24,7 +24,6 @@
 #define E_SPELL_DICTIONARY_H
 
 #include <glib-object.h>
-#include <enchant.h>
 
 /* Standard GObject macros */
 #define E_TYPE_SPELL_DICTIONARY \
@@ -66,7 +65,7 @@ struct _ESpellDictionaryClass {
 GType          e_spell_dictionary_get_type     (void) G_GNUC_CONST;
 ESpellDictionary *
                e_spell_dictionary_new          (struct _ESpellChecker *spell_checker,
-                                                EnchantDict *enchant_dict);
+                                                gpointer enchant_dict); /* EnchantDict * */
 ESpellDictionary *
                e_spell_dictionary_new_bare     (struct _ESpellChecker *spell_checker,
                                                 const gchar *language_tag);


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