[devhelp] dh-error: make it fully private



commit 9d6a6f9bbe3085f2dabca46ca712b80e8c2a0e2d
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon Apr 2 09:45:18 2018 +0200

    dh-error: make it fully private
    
    Not used publicly, so do not export the function.

 devhelp/dh-error.c |   13 ++++++-------
 devhelp/dh-error.h |    6 ++++--
 2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/devhelp/dh-error.c b/devhelp/dh-error.c
index 43df6d9..cb2dadf 100644
--- a/devhelp/dh-error.c
+++ b/devhelp/dh-error.c
@@ -4,6 +4,7 @@
  *
  * Copyright (C) 2002 CodeFactory AB
  * Copyright (C) 2002 Mikael Hallendal <micke imendio com>
+ * Copyright (C) 2018 Sébastien Wilmet <swilmet gnome org>
  *
  * Devhelp is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published
@@ -19,17 +20,15 @@
  * along with Devhelp.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.h"
 #include "dh-error.h"
 
 GQuark
-dh_error_quark (void)
+_dh_error_quark (void)
 {
-        static GQuark q = 0;
+        static GQuark quark = 0;
 
-        if (q == 0) {
-                q = g_quark_from_static_string ("devhelp-error-quark");
-        }
+        if (quark == 0)
+                quark = g_quark_from_static_string ("libdevhelp-error-quark");
 
-        return q;
+        return quark;
 }
diff --git a/devhelp/dh-error.h b/devhelp/dh-error.h
index 9039caa..1e12bb9 100644
--- a/devhelp/dh-error.h
+++ b/devhelp/dh-error.h
@@ -4,6 +4,7 @@
  *
  * Copyright (C) 2002 CodeFactory AB
  * Copyright (C) 2002 Mikael Hallendal <micke imendio com>
+ * Copyright (C) 2018 Sébastien Wilmet <swilmet gnome org>
  *
  * Devhelp is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published
@@ -26,13 +27,14 @@
 
 G_BEGIN_DECLS
 
-#define DH_ERROR dh_error_quark ()
+#define DH_ERROR _dh_error_quark ()
 
 typedef enum {
         DH_ERROR_MALFORMED_BOOK
 } DhError;
 
-GQuark dh_error_quark (void) G_GNUC_CONST;
+G_GNUC_INTERNAL
+GQuark _dh_error_quark (void);
 
 G_END_DECLS
 


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