mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
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
This commit is contained in:
parent
d51198baad
commit
3bd3067ffc
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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 */
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 |
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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) \
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user