mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 00:48:53 +02:00
put newly created param spec types into a global array.
Wed Nov 21 17:23:33 2001 Tim Janik <timj@gtk.org> * gparamspecs.[hc]: put newly created param spec types into a global array. * gboxed.[hc]: moved boxed types with _get_type() function here, for: G_TYPE_CLOSURE, G_TYPE_VALUE, G_TYPE_VALUE_ARRAY, G_TYPE_GSTRING. * gtype.h: removed fundamental branch APIs and derived enum values.
This commit is contained in:
@@ -200,6 +200,12 @@ i.e. just the <filename>foo</filename> in <filename>/usr/bin/foo</filename>.
|
|||||||
|
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
<!-- ##### VARIABLE g_log_domain_glib ##### -->
|
||||||
|
<para>
|
||||||
|
The log domain used for messages logged by GLib itself.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION g_main_add_poll ##### -->
|
<!-- ##### FUNCTION g_main_add_poll ##### -->
|
||||||
<para>
|
<para>
|
||||||
Adds a file descriptor to be polled.
|
Adds a file descriptor to be polled.
|
||||||
|
@@ -449,10 +449,10 @@ g_io_channel_set_flags().
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
@G_IO_FLAG_APPEND: turns on append mode, corresponds to %O_APPEND (see the
|
@G_IO_FLAG_APPEND: turns on append mode, corresponds to %O_APPEND (see the
|
||||||
documentation of the Unix <function>open()</function> syscall).
|
documentation of the Unix <function>open()</function> syscall).
|
||||||
@G_IO_FLAG_NONBLOCK: turns on nonblocking mode, corresponds to
|
@G_IO_FLAG_NONBLOCK: turns on nonblocking mode, corresponds to
|
||||||
%O_NONBLOCK/%O_NDELAY (see the documentation of the Unix
|
%O_NONBLOCK/%O_NDELAY (see the documentation of the Unix
|
||||||
<function>open()</function> syscall).
|
<function>open()</function> syscall).
|
||||||
@G_IO_FLAG_IS_READABLE: indicates that the io channel is readable. This flag
|
@G_IO_FLAG_IS_READABLE: indicates that the io channel is readable. This flag
|
||||||
can not be changed.
|
can not be changed.
|
||||||
@G_IO_FLAG_IS_WRITEABLE: indicates that the io channel is writable. This flag
|
@G_IO_FLAG_IS_WRITEABLE: indicates that the io channel is writable. This flag
|
||||||
|
@@ -38,12 +38,6 @@ INCLUDES = \
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### VARIABLE g_log_domain_glib ##### -->
|
|
||||||
<para>
|
|
||||||
The log domain used for messages logged by GLib itself.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO G_LOG_FATAL_MASK ##### -->
|
<!-- ##### MACRO G_LOG_FATAL_MASK ##### -->
|
||||||
<para>
|
<para>
|
||||||
GLib log levels that are considered fatal by default.
|
GLib log levels that are considered fatal by default.
|
||||||
|
@@ -25,6 +25,12 @@ g_pattern_spec_new() and use g_pattern_match_string() instead of
|
|||||||
g_pattern_match_simple(). This avoids the overhead of repeated
|
g_pattern_match_simple(). This avoids the overhead of repeated
|
||||||
pattern compilation.
|
pattern compilation.
|
||||||
|
|
||||||
|
<!-- ##### SECTION See_Also ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GPatternSpec ##### -->
|
<!-- ##### STRUCT GPatternSpec ##### -->
|
||||||
<para>
|
<para>
|
||||||
A <structname>GPatternSpec</structname> is the 'compiled' form of a pattern.
|
A <structname>GPatternSpec</structname> is the 'compiled' form of a pattern.
|
||||||
|
@@ -202,30 +202,6 @@ The predefined identifiers of the reserved fundamental types.
|
|||||||
@G_TYPE_RESERVED_BSE_FIRST: First fundamental type ID reserved for BSE.
|
@G_TYPE_RESERVED_BSE_FIRST: First fundamental type ID reserved for BSE.
|
||||||
@G_TYPE_RESERVED_BSE_LAST: Last fundamental type ID reserved for BSE.
|
@G_TYPE_RESERVED_BSE_LAST: Last fundamental type ID reserved for BSE.
|
||||||
@G_TYPE_RESERVED_LAST_FUNDAMENTAL: Last reserved fundamental type ID.
|
@G_TYPE_RESERVED_LAST_FUNDAMENTAL: Last reserved fundamental type ID.
|
||||||
@G_TYPE_CLOSURE:
|
|
||||||
@G_TYPE_VALUE:
|
|
||||||
@G_TYPE_VALUE_ARRAY:
|
|
||||||
@G_TYPE_GSTRING:
|
|
||||||
@G_TYPE_PARAM_CHAR: Identifier for the "#GParamSpecChar" type.
|
|
||||||
@G_TYPE_PARAM_UCHAR: Identifier for the "#GParamSpecUChar" type.
|
|
||||||
@G_TYPE_PARAM_BOOLEAN: Identifier for the "#GParamSpecBoolean" type.
|
|
||||||
@G_TYPE_PARAM_INT: Identifier for the "#GParamSpecInt" type.
|
|
||||||
@G_TYPE_PARAM_UINT: Identifier for the "#GParamSpecUInt" type.
|
|
||||||
@G_TYPE_PARAM_LONG: Identifier for the "#GParamSpecLong" type.
|
|
||||||
@G_TYPE_PARAM_ULONG: Identifier for the "#GParamSpecULong" type.
|
|
||||||
@G_TYPE_PARAM_INT64:
|
|
||||||
@G_TYPE_PARAM_UINT64:
|
|
||||||
@G_TYPE_PARAM_UNICHAR:
|
|
||||||
@G_TYPE_PARAM_ENUM: Identifier for the "#GParamSpecEnum" type.
|
|
||||||
@G_TYPE_PARAM_FLAGS: Identifier for the "#GParamSpecFlags" type.
|
|
||||||
@G_TYPE_PARAM_FLOAT: Identifier for the "#GParamSpecFloat" type.
|
|
||||||
@G_TYPE_PARAM_DOUBLE: Identifier for the "#GParamSpecDouble" type.
|
|
||||||
@G_TYPE_PARAM_STRING: Identifier for the "#GParamSpecString" type.
|
|
||||||
@G_TYPE_PARAM_PARAM: Identifier for the "#GParamSpecParam" type.
|
|
||||||
@G_TYPE_PARAM_BOXED: Identifier for the "#GParamSpecBoxed" type.
|
|
||||||
@G_TYPE_PARAM_POINTER: Identifier for the "#GParamSpecPointer" type.
|
|
||||||
@G_TYPE_PARAM_VALUE_ARRAY: Identifier for the "#GParamSpecValueArray" type.
|
|
||||||
@G_TYPE_PARAM_OBJECT: Identifier for the "#GParamSpecObject" type.
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GTypeInterface ##### -->
|
<!-- ##### STRUCT GTypeInterface ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
@@ -1,3 +1,15 @@
|
|||||||
|
Wed Nov 21 17:23:33 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gparamspecs.[hc]: put newly created param spec types into a
|
||||||
|
global array.
|
||||||
|
|
||||||
|
* gboxed.[hc]: moved boxed types with _get_type() function here,
|
||||||
|
for: G_TYPE_CLOSURE, G_TYPE_VALUE, G_TYPE_VALUE_ARRAY,
|
||||||
|
G_TYPE_GSTRING.
|
||||||
|
|
||||||
|
* gtype.h: removed fundamental branch APIs and derived enum
|
||||||
|
values.
|
||||||
|
|
||||||
2001-11-19 jacob berkman <jacob@ximian.com>
|
2001-11-19 jacob berkman <jacob@ximian.com>
|
||||||
|
|
||||||
* gobjectnotifyqueue.c: include glib-object.h rather than
|
* gobjectnotifyqueue.c: include glib-object.h rather than
|
||||||
|
@@ -125,35 +125,54 @@ g_boxed_type_init (void) /* sync with gtype.c */
|
|||||||
type = g_type_register_fundamental (G_TYPE_BOXED, "GBoxed", &info, &finfo,
|
type = g_type_register_fundamental (G_TYPE_BOXED, "GBoxed", &info, &finfo,
|
||||||
G_TYPE_FLAG_ABSTRACT | G_TYPE_FLAG_VALUE_ABSTRACT);
|
G_TYPE_FLAG_ABSTRACT | G_TYPE_FLAG_VALUE_ABSTRACT);
|
||||||
g_assert (type == G_TYPE_BOXED);
|
g_assert (type == G_TYPE_BOXED);
|
||||||
|
}
|
||||||
|
|
||||||
/* boxed: G_TYPE_CLOSURE
|
GType
|
||||||
*/
|
g_closure_get_type (void)
|
||||||
type = g_boxed_type_register_static ("GClosure",
|
{
|
||||||
(GBoxedCopyFunc) g_closure_ref,
|
static GType type_id = 0;
|
||||||
(GBoxedFreeFunc) g_closure_unref);
|
|
||||||
g_assert (type == G_TYPE_CLOSURE);
|
|
||||||
|
|
||||||
/* boxed: G_TYPE_VALUE
|
if (!type_id)
|
||||||
*/
|
type_id = g_boxed_type_register_static ("GClosure",
|
||||||
type = g_boxed_type_register_static ("GValue",
|
(GBoxedCopyFunc) g_closure_ref,
|
||||||
value_copy,
|
(GBoxedFreeFunc) g_closure_unref);
|
||||||
value_free);
|
return type_id;
|
||||||
g_assert (type == G_TYPE_VALUE);
|
}
|
||||||
|
|
||||||
/* boxed: G_TYPE_VALUE_ARRAY
|
GType
|
||||||
*/
|
g_value_get_type (void)
|
||||||
type = g_boxed_type_register_static ("GValueArray",
|
{
|
||||||
(GBoxedCopyFunc) g_value_array_copy,
|
static GType type_id = 0;
|
||||||
(GBoxedFreeFunc) g_value_array_free);
|
|
||||||
g_assert (type == G_TYPE_VALUE_ARRAY);
|
|
||||||
|
|
||||||
/* boxed: G_TYPE_GSTRING
|
if (!type_id)
|
||||||
* yes, the naming is a bit odd, but GString is obviously not G_TYPE_STRING
|
type_id = g_boxed_type_register_static ("GValue",
|
||||||
*/
|
value_copy,
|
||||||
type = g_boxed_type_register_static ("GString",
|
value_free);
|
||||||
gstring_copy,
|
return type_id;
|
||||||
gstring_free);
|
}
|
||||||
g_assert (type == G_TYPE_GSTRING);
|
|
||||||
|
GType
|
||||||
|
g_value_array_get_type (void)
|
||||||
|
{
|
||||||
|
static GType type_id = 0;
|
||||||
|
|
||||||
|
if (!type_id)
|
||||||
|
type_id = g_boxed_type_register_static ("GValueArray",
|
||||||
|
(GBoxedCopyFunc) g_value_array_copy,
|
||||||
|
(GBoxedFreeFunc) g_value_array_free);
|
||||||
|
return type_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
GType
|
||||||
|
g_gstring_get_type (void)
|
||||||
|
{
|
||||||
|
static GType type_id = 0;
|
||||||
|
|
||||||
|
if (!type_id)
|
||||||
|
type_id = g_boxed_type_register_static ("GString", /* the naming is a bit odd, but GString is obviously not G_TYPE_STRING */
|
||||||
|
gstring_copy,
|
||||||
|
gstring_free);
|
||||||
|
return type_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -56,12 +56,21 @@ GType g_boxed_type_register_static (const gchar *name,
|
|||||||
GBoxedFreeFunc boxed_free);
|
GBoxedFreeFunc boxed_free);
|
||||||
|
|
||||||
|
|
||||||
/* --- marshaller specific --- */
|
/* --- GLib boxed types --- */
|
||||||
|
#define G_TYPE_CLOSURE (g_closure_get_type ())
|
||||||
|
#define G_TYPE_VALUE (g_value_get_type ())
|
||||||
|
#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ())
|
||||||
|
#define G_TYPE_GSTRING (g_gstring_get_type ())
|
||||||
|
|
||||||
|
|
||||||
|
/* --- internal (marshaller specific) --- */
|
||||||
void g_value_set_boxed_take_ownership (GValue *value,
|
void g_value_set_boxed_take_ownership (GValue *value,
|
||||||
gconstpointer v_boxed);
|
gconstpointer v_boxed);
|
||||||
|
GType g_closure_get_type (void) G_GNUC_CONST;
|
||||||
|
GType g_value_get_type (void) G_GNUC_CONST;
|
||||||
|
GType g_value_array_get_type (void) G_GNUC_CONST;
|
||||||
|
GType g_gstring_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __G_BOXED_H__ */
|
#endif /* __G_BOXED_H__ */
|
||||||
|
@@ -959,10 +959,17 @@ param_object_values_cmp (GParamSpec *pspec,
|
|||||||
|
|
||||||
|
|
||||||
/* --- type initialization --- */
|
/* --- type initialization --- */
|
||||||
|
GType *g_param_spec_types = NULL;
|
||||||
|
|
||||||
void
|
void
|
||||||
g_param_spec_types_init (void) /* sync with gtype.c */
|
g_param_spec_types_init (void) /* sync with gtype.c */
|
||||||
{
|
{
|
||||||
GType type;
|
const guint n_types = 20;
|
||||||
|
GType type, *spec_types, *spec_types_bound;
|
||||||
|
|
||||||
|
g_param_spec_types = g_new0 (GType, n_types);
|
||||||
|
spec_types = g_param_spec_types;
|
||||||
|
spec_types_bound = g_param_spec_types + n_types;
|
||||||
|
|
||||||
/* G_TYPE_PARAM_CHAR
|
/* G_TYPE_PARAM_CHAR
|
||||||
*/
|
*/
|
||||||
@@ -978,6 +985,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_int_values_cmp, /* values_cmp */
|
param_int_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamChar", &pspec_info);
|
type = g_param_type_register_static ("GParamChar", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_CHAR);
|
g_assert (type == G_TYPE_PARAM_CHAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -995,6 +1003,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_uint_values_cmp, /* values_cmp */
|
param_uint_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamUChar", &pspec_info);
|
type = g_param_type_register_static ("GParamUChar", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_UCHAR);
|
g_assert (type == G_TYPE_PARAM_UCHAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1012,6 +1021,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_int_values_cmp, /* values_cmp */
|
param_int_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamBoolean", &pspec_info);
|
type = g_param_type_register_static ("GParamBoolean", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_BOOLEAN);
|
g_assert (type == G_TYPE_PARAM_BOOLEAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1029,6 +1039,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_int_values_cmp, /* values_cmp */
|
param_int_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamInt", &pspec_info);
|
type = g_param_type_register_static ("GParamInt", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_INT);
|
g_assert (type == G_TYPE_PARAM_INT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1046,6 +1057,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_uint_values_cmp, /* values_cmp */
|
param_uint_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamUInt", &pspec_info);
|
type = g_param_type_register_static ("GParamUInt", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_UINT);
|
g_assert (type == G_TYPE_PARAM_UINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1063,6 +1075,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_long_values_cmp, /* values_cmp */
|
param_long_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamLong", &pspec_info);
|
type = g_param_type_register_static ("GParamLong", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_LONG);
|
g_assert (type == G_TYPE_PARAM_LONG);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1080,6 +1093,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_ulong_values_cmp, /* values_cmp */
|
param_ulong_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamULong", &pspec_info);
|
type = g_param_type_register_static ("GParamULong", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_ULONG);
|
g_assert (type == G_TYPE_PARAM_ULONG);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1097,6 +1111,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_int64_values_cmp, /* values_cmp */
|
param_int64_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamInt64", &pspec_info);
|
type = g_param_type_register_static ("GParamInt64", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_INT64);
|
g_assert (type == G_TYPE_PARAM_INT64);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1114,6 +1129,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_uint64_values_cmp, /* values_cmp */
|
param_uint64_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamUInt64", &pspec_info);
|
type = g_param_type_register_static ("GParamUInt64", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_UINT64);
|
g_assert (type == G_TYPE_PARAM_UINT64);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1131,6 +1147,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_unichar_values_cmp, /* values_cmp */
|
param_unichar_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamUnichar", &pspec_info);
|
type = g_param_type_register_static ("GParamUnichar", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_UNICHAR);
|
g_assert (type == G_TYPE_PARAM_UNICHAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1148,6 +1165,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_long_values_cmp, /* values_cmp */
|
param_long_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamEnum", &pspec_info);
|
type = g_param_type_register_static ("GParamEnum", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_ENUM);
|
g_assert (type == G_TYPE_PARAM_ENUM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1165,6 +1183,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_ulong_values_cmp, /* values_cmp */
|
param_ulong_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamFlags", &pspec_info);
|
type = g_param_type_register_static ("GParamFlags", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_FLAGS);
|
g_assert (type == G_TYPE_PARAM_FLAGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1182,6 +1201,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_float_values_cmp, /* values_cmp */
|
param_float_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamFloat", &pspec_info);
|
type = g_param_type_register_static ("GParamFloat", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_FLOAT);
|
g_assert (type == G_TYPE_PARAM_FLOAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1199,6 +1219,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_double_values_cmp, /* values_cmp */
|
param_double_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamDouble", &pspec_info);
|
type = g_param_type_register_static ("GParamDouble", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_DOUBLE);
|
g_assert (type == G_TYPE_PARAM_DOUBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1216,6 +1237,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_string_values_cmp, /* values_cmp */
|
param_string_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamString", &pspec_info);
|
type = g_param_type_register_static ("GParamString", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_STRING);
|
g_assert (type == G_TYPE_PARAM_STRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1233,6 +1255,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_pointer_values_cmp, /* values_cmp */
|
param_pointer_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamParam", &pspec_info);
|
type = g_param_type_register_static ("GParamParam", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_PARAM);
|
g_assert (type == G_TYPE_PARAM_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1250,6 +1273,7 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_boxed_values_cmp, /* values_cmp */
|
param_boxed_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamBoxed", &pspec_info);
|
type = g_param_type_register_static ("GParamBoxed", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_BOXED);
|
g_assert (type == G_TYPE_PARAM_BOXED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1267,23 +1291,26 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_pointer_values_cmp, /* values_cmp */
|
param_pointer_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamPointer", &pspec_info);
|
type = g_param_type_register_static ("GParamPointer", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_POINTER);
|
g_assert (type == G_TYPE_PARAM_POINTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* G_TYPE_PARAM_VALUE_ARRAY
|
/* G_TYPE_PARAM_VALUE_ARRAY
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
static const GParamSpecTypeInfo pspec_info = {
|
static /* const */ GParamSpecTypeInfo pspec_info = {
|
||||||
sizeof (GParamSpecValueArray), /* instance_size */
|
sizeof (GParamSpecValueArray), /* instance_size */
|
||||||
0, /* n_preallocs */
|
0, /* n_preallocs */
|
||||||
param_value_array_init, /* instance_init */
|
param_value_array_init, /* instance_init */
|
||||||
G_TYPE_VALUE_ARRAY, /* value_type */
|
0xdeadbeef, /* value_type, assigned further down */
|
||||||
param_value_array_finalize, /* finalize */
|
param_value_array_finalize, /* finalize */
|
||||||
param_value_array_set_default, /* value_set_default */
|
param_value_array_set_default, /* value_set_default */
|
||||||
param_value_array_validate, /* value_validate */
|
param_value_array_validate, /* value_validate */
|
||||||
param_value_array_values_cmp, /* values_cmp */
|
param_value_array_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
|
pspec_info.value_type = G_TYPE_VALUE_ARRAY;
|
||||||
type = g_param_type_register_static ("GParamValueArray", &pspec_info);
|
type = g_param_type_register_static ("GParamValueArray", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_VALUE_ARRAY);
|
g_assert (type == G_TYPE_PARAM_VALUE_ARRAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1301,8 +1328,11 @@ g_param_spec_types_init (void) /* sync with gtype.c */
|
|||||||
param_object_values_cmp, /* values_cmp */
|
param_object_values_cmp, /* values_cmp */
|
||||||
};
|
};
|
||||||
type = g_param_type_register_static ("GParamObject", &pspec_info);
|
type = g_param_type_register_static ("GParamObject", &pspec_info);
|
||||||
|
*spec_types++ = type;
|
||||||
g_assert (type == G_TYPE_PARAM_OBJECT);
|
g_assert (type == G_TYPE_PARAM_OBJECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_assert (spec_types == spec_types_bound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -33,44 +33,64 @@
|
|||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/* --- type macros --- */
|
/* --- type macros --- */
|
||||||
|
#define G_TYPE_PARAM_CHAR (g_param_spec_types[0])
|
||||||
#define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
|
#define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
|
||||||
#define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
|
#define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
|
||||||
|
#define G_TYPE_PARAM_UCHAR (g_param_spec_types[1])
|
||||||
#define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
|
#define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
|
||||||
#define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
|
#define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
|
||||||
|
#define G_TYPE_PARAM_BOOLEAN (g_param_spec_types[2])
|
||||||
#define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
|
#define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
|
||||||
#define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
|
#define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
|
||||||
|
#define G_TYPE_PARAM_INT (g_param_spec_types[3])
|
||||||
#define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
|
#define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
|
||||||
#define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
|
#define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
|
||||||
|
#define G_TYPE_PARAM_UINT (g_param_spec_types[4])
|
||||||
#define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
|
#define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
|
||||||
#define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
|
#define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
|
||||||
|
#define G_TYPE_PARAM_LONG (g_param_spec_types[5])
|
||||||
#define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
|
#define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
|
||||||
#define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
|
#define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
|
||||||
|
#define G_TYPE_PARAM_ULONG (g_param_spec_types[6])
|
||||||
#define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
|
#define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
|
||||||
#define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
|
#define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
|
||||||
#define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
|
#define G_TYPE_PARAM_INT64 (g_param_spec_types[7])
|
||||||
#define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
|
#define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
|
||||||
#define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
|
#define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
|
||||||
#define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
|
#define G_TYPE_PARAM_UINT64 (g_param_spec_types[8])
|
||||||
|
#define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
|
||||||
|
#define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
|
||||||
|
#define G_TYPE_PARAM_UNICHAR (g_param_spec_types[9])
|
||||||
#define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
|
#define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
|
||||||
#define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
|
#define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
|
||||||
|
#define G_TYPE_PARAM_ENUM (g_param_spec_types[10])
|
||||||
#define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
|
#define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
|
||||||
#define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
|
#define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
|
||||||
|
#define G_TYPE_PARAM_FLAGS (g_param_spec_types[11])
|
||||||
#define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
|
#define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
|
||||||
#define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
|
#define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
|
||||||
|
#define G_TYPE_PARAM_FLOAT (g_param_spec_types[12])
|
||||||
#define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
|
#define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
|
||||||
#define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
|
#define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
|
||||||
|
#define G_TYPE_PARAM_DOUBLE (g_param_spec_types[13])
|
||||||
#define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
|
#define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
|
||||||
#define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
|
#define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
|
||||||
|
#define G_TYPE_PARAM_STRING (g_param_spec_types[14])
|
||||||
#define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
|
#define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
|
||||||
#define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
|
#define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
|
||||||
|
#define G_TYPE_PARAM_PARAM (g_param_spec_types[15])
|
||||||
#define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
|
#define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
|
||||||
#define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
|
#define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
|
||||||
|
#define G_TYPE_PARAM_BOXED (g_param_spec_types[16])
|
||||||
#define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
|
#define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
|
||||||
#define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
|
#define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
|
||||||
|
#define G_TYPE_PARAM_POINTER (g_param_spec_types[17])
|
||||||
#define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
|
#define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
|
||||||
#define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
|
#define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
|
||||||
|
#define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18])
|
||||||
#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
|
#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
|
||||||
#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
|
#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
|
||||||
|
#define G_TYPE_PARAM_OBJECT (g_param_spec_types[19])
|
||||||
#define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
|
#define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
|
||||||
#define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
|
#define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
|
||||||
|
|
||||||
@@ -362,6 +382,10 @@ GParamSpec* g_param_spec_object (const gchar *name,
|
|||||||
GType object_type,
|
GType object_type,
|
||||||
GParamFlags flags);
|
GParamFlags flags);
|
||||||
|
|
||||||
|
|
||||||
|
/* --- internal --- */
|
||||||
|
GLIB_VAR GType *g_param_spec_types;
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __G_PARAMSPECS_H__ */
|
#endif /* __G_PARAMSPECS_H__ */
|
||||||
|
@@ -255,6 +255,7 @@ static TypeNode ***static_type_nodes = NULL;
|
|||||||
static inline TypeNode*
|
static inline TypeNode*
|
||||||
lookup_type_node_L (register GType utype)
|
lookup_type_node_L (register GType utype)
|
||||||
{
|
{
|
||||||
|
#define G_TYPE_BRANCH_SEQNO(type) ((type) >> 8)
|
||||||
register GType ftype = G_TYPE_FUNDAMENTAL (utype);
|
register GType ftype = G_TYPE_FUNDAMENTAL (utype);
|
||||||
register GType b_seqno = G_TYPE_BRANCH_SEQNO (utype);
|
register GType b_seqno = G_TYPE_BRANCH_SEQNO (utype);
|
||||||
|
|
||||||
@@ -278,7 +279,7 @@ type_node_any_new_W (TypeNode *pnode,
|
|||||||
|
|
||||||
n_supers = pnode ? pnode->n_supers + 1 : 0;
|
n_supers = pnode ? pnode->n_supers + 1 : 0;
|
||||||
branch_last = static_branch_seqnos[ftype]++;
|
branch_last = static_branch_seqnos[ftype]++;
|
||||||
type = G_TYPE_DERIVE_ID (ftype, branch_last);
|
type = ftype | (branch_last << 8); // FIXME: G_TYPE_DERIVE_ID (ftype, branch_last);
|
||||||
g_assert ((type & G_TYPE_FLAG_RESERVED_ID_BIT) == 0);
|
g_assert ((type & G_TYPE_FLAG_RESERVED_ID_BIT) == 0);
|
||||||
if (!branch_last || g_bit_storage (branch_last - 1) < g_bit_storage (static_branch_seqnos[ftype] - 1))
|
if (!branch_last || g_bit_storage (branch_last - 1) < g_bit_storage (static_branch_seqnos[ftype] - 1))
|
||||||
static_type_nodes[ftype] = g_renew (TypeNode*, static_type_nodes[ftype], 1 << g_bit_storage (static_branch_seqnos[ftype] - 1));
|
static_type_nodes[ftype] = g_renew (TypeNode*, static_type_nodes[ftype], 1 << g_bit_storage (static_branch_seqnos[ftype] - 1));
|
||||||
@@ -2254,7 +2255,7 @@ g_type_is_a (GType type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
guint
|
guint
|
||||||
g_type_fundamental_branch_last (GType type)
|
_g_type_fundamental_branch_last (GType type)
|
||||||
{
|
{
|
||||||
GType ftype = G_TYPE_FUNDAMENTAL (type);
|
GType ftype = G_TYPE_FUNDAMENTAL (type);
|
||||||
guint last_type;
|
guint last_type;
|
||||||
|
@@ -31,8 +31,6 @@ G_BEGIN_DECLS
|
|||||||
*/
|
*/
|
||||||
#define G_TYPE_FUNDAMENTAL(type) ((type) & 0xff)
|
#define G_TYPE_FUNDAMENTAL(type) ((type) & 0xff)
|
||||||
#define G_TYPE_FUNDAMENTAL_MAX (0xff)
|
#define G_TYPE_FUNDAMENTAL_MAX (0xff)
|
||||||
#define G_TYPE_DERIVE_ID(ptype, branch_seqno) (G_TYPE_FUNDAMENTAL (ptype) | ((branch_seqno) << 8))
|
|
||||||
#define G_TYPE_BRANCH_SEQNO(type) ((type) >> 8)
|
|
||||||
#define G_TYPE_FUNDAMENTAL_LAST ((GType) g_type_fundamental_last ())
|
#define G_TYPE_FUNDAMENTAL_LAST ((GType) g_type_fundamental_last ())
|
||||||
|
|
||||||
|
|
||||||
@@ -71,40 +69,13 @@ typedef enum /*< skip >*/
|
|||||||
G_TYPE_RESERVED_BSE_FIRST,
|
G_TYPE_RESERVED_BSE_FIRST,
|
||||||
G_TYPE_RESERVED_BSE_LAST = G_TYPE_RESERVED_BSE_FIRST + 15,
|
G_TYPE_RESERVED_BSE_LAST = G_TYPE_RESERVED_BSE_FIRST + 15,
|
||||||
G_TYPE_RESERVED_LAST_FUNDAMENTAL,
|
G_TYPE_RESERVED_LAST_FUNDAMENTAL,
|
||||||
|
|
||||||
/* derived type ids */
|
|
||||||
G_TYPE_CLOSURE = G_TYPE_DERIVE_ID (G_TYPE_BOXED, 1),
|
|
||||||
G_TYPE_VALUE = G_TYPE_DERIVE_ID (G_TYPE_BOXED, 2),
|
|
||||||
G_TYPE_VALUE_ARRAY = G_TYPE_DERIVE_ID (G_TYPE_BOXED, 3),
|
|
||||||
G_TYPE_GSTRING = G_TYPE_DERIVE_ID (G_TYPE_BOXED, 4),
|
|
||||||
G_TYPE_PARAM_CHAR = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 1),
|
|
||||||
G_TYPE_PARAM_UCHAR = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 2),
|
|
||||||
G_TYPE_PARAM_BOOLEAN = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 3),
|
|
||||||
G_TYPE_PARAM_INT = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 4),
|
|
||||||
G_TYPE_PARAM_UINT = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 5),
|
|
||||||
G_TYPE_PARAM_LONG = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 6),
|
|
||||||
G_TYPE_PARAM_ULONG = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 7),
|
|
||||||
G_TYPE_PARAM_INT64 = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 8),
|
|
||||||
G_TYPE_PARAM_UINT64 = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 9),
|
|
||||||
G_TYPE_PARAM_UNICHAR = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 10),
|
|
||||||
G_TYPE_PARAM_ENUM = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 11),
|
|
||||||
G_TYPE_PARAM_FLAGS = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 12),
|
|
||||||
G_TYPE_PARAM_FLOAT = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 13),
|
|
||||||
G_TYPE_PARAM_DOUBLE = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 14),
|
|
||||||
G_TYPE_PARAM_STRING = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 15),
|
|
||||||
G_TYPE_PARAM_PARAM = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 16),
|
|
||||||
G_TYPE_PARAM_BOXED = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 17),
|
|
||||||
G_TYPE_PARAM_POINTER = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 18),
|
|
||||||
G_TYPE_PARAM_VALUE_ARRAY = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 19),
|
|
||||||
G_TYPE_PARAM_OBJECT = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 20)
|
|
||||||
|
|
||||||
} GTypeFundamentals;
|
} GTypeFundamentals;
|
||||||
|
|
||||||
|
|
||||||
/* Type Checking Macros
|
/* Type Checking Macros
|
||||||
*/
|
*/
|
||||||
#define G_TYPE_IS_FUNDAMENTAL(type) (G_TYPE_BRANCH_SEQNO (type) == 0)
|
#define G_TYPE_IS_FUNDAMENTAL(type) ((type) <= G_TYPE_FUNDAMENTAL_MAX)
|
||||||
#define G_TYPE_IS_DERIVED(type) (G_TYPE_BRANCH_SEQNO (type) > 0)
|
#define G_TYPE_IS_DERIVED(type) ((type) > G_TYPE_FUNDAMENTAL_MAX)
|
||||||
#define G_TYPE_IS_INTERFACE(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE)
|
#define G_TYPE_IS_INTERFACE(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE)
|
||||||
#define G_TYPE_IS_CLASSED(type) (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED))
|
#define G_TYPE_IS_CLASSED(type) (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED))
|
||||||
#define G_TYPE_IS_INSTANTIATABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE))
|
#define G_TYPE_IS_INSTANTIATABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE))
|
||||||
@@ -119,7 +90,7 @@ typedef enum /*< skip >*/
|
|||||||
|
|
||||||
/* Typedefs
|
/* Typedefs
|
||||||
*/
|
*/
|
||||||
typedef guint32 GType;
|
typedef gsize GType;
|
||||||
typedef struct _GValue GValue;
|
typedef struct _GValue GValue;
|
||||||
typedef union _GTypeCValue GTypeCValue;
|
typedef union _GTypeCValue GTypeCValue;
|
||||||
typedef struct _GTypePlugin GTypePlugin;
|
typedef struct _GTypePlugin GTypePlugin;
|
||||||
@@ -200,7 +171,7 @@ GType g_type_next_base (GType leaf_type
|
|||||||
GType root_type);
|
GType root_type);
|
||||||
gboolean g_type_is_a (GType type,
|
gboolean g_type_is_a (GType type,
|
||||||
GType is_a_type);
|
GType is_a_type);
|
||||||
guint g_type_fundamental_branch_last (GType type);
|
//FIXME: guint g_type_fundamental_branch_last (GType type);
|
||||||
gpointer g_type_class_ref (GType type);
|
gpointer g_type_class_ref (GType type);
|
||||||
gpointer g_type_class_peek (GType type);
|
gpointer g_type_class_peek (GType type);
|
||||||
void g_type_class_unref (gpointer g_class);
|
void g_type_class_unref (gpointer g_class);
|
||||||
|
Reference in New Issue
Block a user