mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-15 20:18:05 +02:00
datetime: Add GDateTime to the GType system
As with other GLib data types, use a GBoxed.
This commit is contained in:
parent
e1f13ee9ed
commit
e35ed21f43
@ -140,6 +140,8 @@ G_DEFINE_BOXED_TYPE (GVariantType, g_variant_type, g_variant_type_copy, g_varian
|
|||||||
|
|
||||||
G_DEFINE_BOXED_TYPE (GError, g_error, g_error_copy, g_error_free)
|
G_DEFINE_BOXED_TYPE (GError, g_error, g_error_copy, g_error_free)
|
||||||
|
|
||||||
|
G_DEFINE_BOXED_TYPE (GDateTime, g_date_time, g_date_time_ref, g_date_time_unref);
|
||||||
|
|
||||||
/* This one can't use G_DEFINE_BOXED_TYPE (GStrv, g_strv, g_strdupv, g_strfreev) */
|
/* This one can't use G_DEFINE_BOXED_TYPE (GStrv, g_strv, g_strdupv, g_strfreev) */
|
||||||
GType
|
GType
|
||||||
g_strv_get_type (void)
|
g_strv_get_type (void)
|
||||||
|
@ -202,7 +202,14 @@ GType g_boxed_type_register_static (const gchar *name,
|
|||||||
* Since: 2.26
|
* Since: 2.26
|
||||||
*/
|
*/
|
||||||
#define G_TYPE_ERROR (g_error_get_type ())
|
#define G_TYPE_ERROR (g_error_get_type ())
|
||||||
|
/**
|
||||||
|
* G_TYPE_DATE_TIME
|
||||||
|
*
|
||||||
|
* The #GType for a boxed type holding a #GDateTime.
|
||||||
|
*
|
||||||
|
* Since: 2.26
|
||||||
|
*/
|
||||||
|
#define G_TYPE_DATE_TIME (g_date_time_get_type ())
|
||||||
|
|
||||||
void g_value_take_boxed (GValue *value,
|
void g_value_take_boxed (GValue *value,
|
||||||
gconstpointer v_boxed);
|
gconstpointer v_boxed);
|
||||||
@ -223,6 +230,7 @@ GType g_ptr_array_get_type (void) G_GNUC_CONST;
|
|||||||
GType g_variant_type_get_gtype(void) G_GNUC_CONST;
|
GType g_variant_type_get_gtype(void) G_GNUC_CONST;
|
||||||
GType g_regex_get_type (void) G_GNUC_CONST;
|
GType g_regex_get_type (void) G_GNUC_CONST;
|
||||||
GType g_error_get_type (void) G_GNUC_CONST;
|
GType g_error_get_type (void) G_GNUC_CONST;
|
||||||
|
GType g_date_time_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
#ifndef G_DISABLE_DEPRECATED
|
#ifndef G_DISABLE_DEPRECATED
|
||||||
GType g_variant_get_gtype (void) G_GNUC_CONST;
|
GType g_variant_get_gtype (void) G_GNUC_CONST;
|
||||||
|
@ -31,6 +31,7 @@ g_boxed_copy
|
|||||||
g_boxed_free
|
g_boxed_free
|
||||||
g_boxed_type_register_static
|
g_boxed_type_register_static
|
||||||
g_date_get_type G_GNUC_CONST
|
g_date_get_type G_GNUC_CONST
|
||||||
|
g_date_time_get_type G_GNUC_CONST
|
||||||
g_gstring_get_type G_GNUC_CONST
|
g_gstring_get_type G_GNUC_CONST
|
||||||
g_strv_get_type G_GNUC_CONST
|
g_strv_get_type G_GNUC_CONST
|
||||||
g_hash_table_get_type G_GNUC_CONST
|
g_hash_table_get_type G_GNUC_CONST
|
||||||
|
Loading…
x
Reference in New Issue
Block a user