[glib] gobject: Use _ prefixing in private headers over G_GNUC_INTERNAL in public headers
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gobject: Use _ prefixing in private headers over G_GNUC_INTERNAL in public headers
- Date: Fri, 3 Jun 2011 16:47:35 +0000 (UTC)
commit 3bd3067ffc1617b2fe96498b18b68aa7f2644487
Author: Colin Walters <walters verbum org>
Date: Thu Jun 2 17:14:58 2011 -0400
gobject: Use _ prefixing in private headers over G_GNUC_INTERNAL in public headers
This helps out gtk-doc and g-ir-scanner, and also makes much clearer
what's private versus public.
https://bugzilla.gnome.org/show_bug.cgi?id=651745
docs/reference/gobject/gobject-sections.txt | 10 ----------
docs/reference/gobject/tut_gtype.xml | 2 +-
gobject/gboxed.c | 2 +-
gobject/genums.c | 3 ++-
gobject/gobject.c | 3 ++-
gobject/gparam.c | 2 +-
gobject/gparamspecs.c | 3 ++-
gobject/gsignal.c | 4 ++--
gobject/gtype-private.h | 10 ++++++++++
gobject/gtype.c | 18 +++++++++---------
gobject/gtype.h | 12 ------------
gobject/gvalue.c | 2 +-
gobject/gvaluetransform.c | 3 ++-
gobject/gvaluetypes.c | 3 ++-
14 files changed, 35 insertions(+), 42 deletions(-)
---
diff --git a/docs/reference/gobject/gobject-sections.txt b/docs/reference/gobject/gobject-sections.txt
index 6d8fa22..bd5e672 100644
--- a/docs/reference/gobject/gobject-sections.txt
+++ b/docs/reference/gobject/gobject-sections.txt
@@ -162,16 +162,6 @@ G_TYPE_RESERVED_USER_FIRST
<SUBSECTION Private>
GOBJECT_VAR
-g_value_c_init
-g_value_types_init
-g_enum_types_init
-g_param_type_init
-g_boxed_type_init
-g_object_type_init
-g_param_spec_types_init
-g_value_transforms_init
-g_signal_init
-g_gtype_get_type
</SECTION>
<SECTION>
diff --git a/docs/reference/gobject/tut_gtype.xml b/docs/reference/gobject/tut_gtype.xml
index 133b5ae..2128aca 100644
--- a/docs/reference/gobject/tut_gtype.xml
+++ b/docs/reference/gobject/tut_gtype.xml
@@ -337,7 +337,7 @@ G_DEFINE_TYPE (MamanBar, maman_bar, G_TYPE_OBJECT)
<para>
A lot of types are not instantiable by the type system and do not have
a class. Most of these types are fundamental trivial types such as <emphasis>gchar</emphasis>,
- registered in <function>g_value_types_init</function> (in <filename>gvaluetypes.c</filename>).
+ registered in <function>_g_value_types_init</function> (in <filename>gvaluetypes.c</filename>).
</para>
<para>
diff --git a/gobject/gboxed.c b/gobject/gboxed.c
index b095539..6fa8f26 100644
--- a/gobject/gboxed.c
+++ b/gobject/gboxed.c
@@ -75,7 +75,7 @@ value_free (GValue *value)
}
void
-g_boxed_type_init (void)
+_g_boxed_type_init (void)
{
static const GTypeInfo info = {
0, /* class_size */
diff --git a/gobject/genums.c b/gobject/genums.c
index ab30bef..4346508 100644
--- a/gobject/genums.c
+++ b/gobject/genums.c
@@ -26,6 +26,7 @@
#include <string.h>
#include "genums.h"
+#include "gtype-private.h"
#include "gvalue.h"
#include "gvaluecollector.h"
@@ -74,7 +75,7 @@ static gchar* value_flags_enum_lcopy_value (const GValue *value,
/* --- functions --- */
void
-g_enum_types_init (void)
+_g_enum_types_init (void)
{
static gboolean initialized = FALSE;
static const GTypeValueTable flags_enum_value_table = {
diff --git a/gobject/gobject.c b/gobject/gobject.c
index 33c9785..da29657 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -27,6 +27,7 @@
#include <signal.h>
#include "gobject.h"
+#include "gtype-private.h"
#include "gvaluecollector.h"
#include "gsignal.h"
#include "gparamspecs.h"
@@ -235,7 +236,7 @@ debug_objects_atexit (void)
#endif /* G_ENABLE_DEBUG */
void
-g_object_type_init (void)
+_g_object_type_init (void)
{
static gboolean initialized = FALSE;
static const GTypeFundamentalInfo finfo = {
diff --git a/gobject/gparam.c b/gobject/gparam.c
index bca47d2..383e3be 100644
--- a/gobject/gparam.c
+++ b/gobject/gparam.c
@@ -86,7 +86,7 @@ static gchar* value_param_lcopy_value (const GValue *value,
/* --- functions --- */
void
-g_param_type_init (void)
+_g_param_type_init (void)
{
static const GTypeFundamentalInfo finfo = {
(G_TYPE_FLAG_CLASSED |
diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
index f49936b..d1e3e88 100644
--- a/gobject/gparamspecs.c
+++ b/gobject/gparamspecs.c
@@ -27,6 +27,7 @@
#include <string.h>
#include "gparamspecs.h"
+#include "gtype-private.h"
#include "gvaluecollector.h"
#include "gvaluearray.h"
@@ -1160,7 +1161,7 @@ param_variant_values_cmp (GParamSpec *pspec,
GType *g_param_spec_types = NULL;
void
-g_param_spec_types_init (void)
+_g_param_spec_types_init (void)
{
const guint n_types = 23;
GType type, *spec_types, *spec_types_bound;
diff --git a/gobject/gsignal.c b/gobject/gsignal.c
index c4375b1..649120b 100644
--- a/gobject/gsignal.c
+++ b/gobject/gsignal.c
@@ -30,10 +30,10 @@
#include <signal.h>
#include "gsignal.h"
+#include "gtype-private.h"
#include "gbsearcharray.h"
#include "gvaluecollector.h"
#include "gvaluetypes.h"
-#include "gboxed.h"
#include "gobject.h"
#include "genums.h"
#include "gobject_trace.h"
@@ -765,7 +765,7 @@ signal_key_cmp (gconstpointer node1,
}
void
-g_signal_init (void)
+_g_signal_init (void)
{
SIGNAL_LOCK ();
if (!g_n_signal_nodes)
diff --git a/gobject/gtype-private.h b/gobject/gtype-private.h
index 664eb55..85b6c58 100644
--- a/gobject/gtype-private.h
+++ b/gobject/gtype-private.h
@@ -27,6 +27,16 @@
G_BEGIN_DECLS
+void _g_value_c_init (void); /* sync with gvalue.c */
+void _g_value_types_init (void); /* sync with gvaluetypes.c */
+void _g_enum_types_init (void); /* sync with genums.c */
+void _g_param_type_init (void); /* sync with gparam.c */
+void _g_boxed_type_init (void); /* sync with gboxed.c */
+void _g_object_type_init (void); /* sync with gobject.c */
+void _g_param_spec_types_init (void); /* sync with gparamspecs.c */
+void _g_value_transforms_init (void); /* sync with gvaluetransform.c */
+void _g_signal_init (void); /* sync with gsignal.c */
+
/* for gboxed.c */
gpointer _g_type_boxed_copy (GType type,
gpointer value);
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 8baa098..d23bd2c 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -4321,7 +4321,7 @@ g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
G_WRITE_UNLOCK (&type_rw_lock);
- g_value_c_init ();
+ _g_value_c_init ();
/* G_TYPE_TYPE_PLUGIN
*/
@@ -4329,35 +4329,35 @@ g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
/* G_TYPE_* value types
*/
- g_value_types_init ();
+ _g_value_types_init ();
/* G_TYPE_ENUM & G_TYPE_FLAGS
*/
- g_enum_types_init ();
+ _g_enum_types_init ();
/* G_TYPE_BOXED
*/
- g_boxed_type_init ();
+ _g_boxed_type_init ();
/* G_TYPE_PARAM
*/
- g_param_type_init ();
+ _g_param_type_init ();
/* G_TYPE_OBJECT
*/
- g_object_type_init ();
+ _g_object_type_init ();
/* G_TYPE_PARAM_* pspec types
*/
- g_param_spec_types_init ();
+ _g_param_spec_types_init ();
/* Value Transformations
*/
- g_value_transforms_init ();
+ _g_value_transforms_init ();
/* Signal system
*/
- g_signal_init ();
+ _g_signal_init ();
G_UNLOCK (type_init_lock);
}
diff --git a/gobject/gtype.h b/gobject/gtype.h
index 54befc8..22210d6 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -1661,18 +1661,6 @@ G_CONST_RETURN gchar* g_type_name_from_instance (GTypeInstance *instance);
G_CONST_RETURN gchar* g_type_name_from_class (GTypeClass *g_class);
-/* --- internal functions --- */
-G_GNUC_INTERNAL void g_value_c_init (void); /* sync with gvalue.c */
-G_GNUC_INTERNAL void g_value_types_init (void); /* sync with gvaluetypes.c */
-G_GNUC_INTERNAL void g_enum_types_init (void); /* sync with genums.c */
-G_GNUC_INTERNAL void g_param_type_init (void); /* sync with gparam.c */
-G_GNUC_INTERNAL void g_boxed_type_init (void); /* sync with gboxed.c */
-G_GNUC_INTERNAL void g_object_type_init (void); /* sync with gobject.c */
-G_GNUC_INTERNAL void g_param_spec_types_init (void); /* sync with gparamspecs.c */
-G_GNUC_INTERNAL void g_value_transforms_init (void); /* sync with gvaluetransform.c */
-G_GNUC_INTERNAL void g_signal_init (void); /* sync with gsignal.c */
-
-
/* --- implementation bits --- */
#ifndef G_DISABLE_CAST_CHECKS
# define _G_TYPE_CIC(ip, gt, ct) \
diff --git a/gobject/gvalue.c b/gobject/gvalue.c
index 573969c..7757474 100644
--- a/gobject/gvalue.c
+++ b/gobject/gvalue.c
@@ -139,7 +139,7 @@ static GBSearchConfig transform_bconfig = {
/* --- functions --- */
void
-g_value_c_init (void)
+_g_value_c_init (void)
{
transform_array = g_bsearch_array_create (&transform_bconfig);
}
diff --git a/gobject/gvaluetransform.c b/gobject/gvaluetransform.c
index 825ba6f..1b7b4fd 100644
--- a/gobject/gvaluetransform.c
+++ b/gobject/gvaluetransform.c
@@ -22,6 +22,7 @@
#include <string.h>
#include "gvalue.h"
+#include "gtype-private.h"
#include "genums.h"
@@ -243,7 +244,7 @@ value_transform_flags_string (const GValue *src_value,
/* registration
*/
void
-g_value_transforms_init (void)
+_g_value_transforms_init (void)
{
/* some transformations are a bit questionable,
* we currently skip those
diff --git a/gobject/gvaluetypes.c b/gobject/gvaluetypes.c
index 78c7266..df3ef54 100644
--- a/gobject/gvaluetypes.c
+++ b/gobject/gvaluetypes.c
@@ -28,6 +28,7 @@
#include <stdlib.h> /* qsort() */
#include "gvaluetypes.h"
+#include "gtype-private.h"
#include "gvaluecollector.h"
#include "gobject.h"
#include "gparam.h"
@@ -421,7 +422,7 @@ value_lcopy_variant (const GValue *value,
/* --- type initialization --- */
void
-g_value_types_init (void)
+_g_value_types_init (void)
{
GTypeInfo info = {
0, /* class_size */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]