mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-09 18:54:04 +02:00
Add a boxed type for GDate. (#301787, Tim-Philipp Müller)
2005-04-29 Matthias Clasen <mclasen@redhat.com> * gobject.symbols: * gboxed.h (G_TYPE_DATE): * gboxed.c: Add a boxed type for GDate. (#301787, Tim-Philipp Müller)
This commit is contained in:
committed by
Matthias Clasen
parent
98b40e24de
commit
a82bcb3107
@@ -1,3 +1,8 @@
|
|||||||
|
2005-04-29 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gobject/tmpl/gboxed.sgml:
|
||||||
|
* gobject/gobject-sections.txt: Add G_TYPE_DATE.
|
||||||
|
|
||||||
2005-04-23 Stefan Kost <ensonic@users.sf.net>
|
2005-04-23 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* gobject/tut_gtype.xml:
|
* gobject/tut_gtype.xml:
|
||||||
|
@@ -309,6 +309,7 @@ g_boxed_type_register_static
|
|||||||
g_pointer_type_register_static
|
g_pointer_type_register_static
|
||||||
|
|
||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
|
G_TYPE_DATE
|
||||||
G_TYPE_GSTRING
|
G_TYPE_GSTRING
|
||||||
G_TYPE_STRV
|
G_TYPE_STRV
|
||||||
GStrv
|
GStrv
|
||||||
|
@@ -75,6 +75,13 @@ pointer type with name @name.
|
|||||||
@Returns: a new %G_TYPE_POINTER derived type id for @name.
|
@Returns: a new %G_TYPE_POINTER derived type id for @name.
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### MACRO G_TYPE_DATE ##### -->
|
||||||
|
<para>
|
||||||
|
The #GType for #GDate.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO G_TYPE_GSTRING ##### -->
|
<!-- ##### MACRO G_TYPE_GSTRING ##### -->
|
||||||
<para>
|
<para>
|
||||||
The #GType for #GString.
|
The #GType for #GString.
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
2005-04-29 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gobject.symbols:
|
||||||
|
* gboxed.h (G_TYPE_DATE):
|
||||||
|
* gboxed.c: Add a boxed type for GDate. (#301787, Tim-Philipp
|
||||||
|
Müller)
|
||||||
|
|
||||||
2005-03-25 Matthias Clasen <mclasen@redhat.com>
|
2005-03-25 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gparam.c (param_spec_ht_lookup): Don't do the second
|
* gparam.c (param_spec_ht_lookup): Don't do the second
|
||||||
|
@@ -93,6 +93,14 @@ value_free (gpointer boxed)
|
|||||||
g_free (value);
|
g_free (value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gpointer
|
||||||
|
gdate_copy (gpointer boxed)
|
||||||
|
{
|
||||||
|
const GDate *date = (const GDate*) boxed;
|
||||||
|
|
||||||
|
return g_date_new_julian (g_date_get_julian (date));
|
||||||
|
}
|
||||||
|
|
||||||
static gpointer
|
static gpointer
|
||||||
gstring_copy (gpointer boxed)
|
gstring_copy (gpointer boxed)
|
||||||
{
|
{
|
||||||
@@ -172,6 +180,18 @@ g_value_array_get_type (void)
|
|||||||
return type_id;
|
return type_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GType
|
||||||
|
g_date_get_type (void)
|
||||||
|
{
|
||||||
|
static GType type_id = 0;
|
||||||
|
|
||||||
|
if (!type_id)
|
||||||
|
type_id = g_boxed_type_register_static ("GDate",
|
||||||
|
(GBoxedCopyFunc) gdate_copy,
|
||||||
|
(GBoxedFreeFunc) g_date_free);
|
||||||
|
return type_id;
|
||||||
|
}
|
||||||
|
|
||||||
GType
|
GType
|
||||||
g_strv_get_type (void)
|
g_strv_get_type (void)
|
||||||
{
|
{
|
||||||
|
@@ -60,6 +60,7 @@ GType g_boxed_type_register_static (const gchar *name,
|
|||||||
#define G_TYPE_CLOSURE (g_closure_get_type ())
|
#define G_TYPE_CLOSURE (g_closure_get_type ())
|
||||||
#define G_TYPE_VALUE (g_value_get_type ())
|
#define G_TYPE_VALUE (g_value_get_type ())
|
||||||
#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ())
|
#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ())
|
||||||
|
#define G_TYPE_DATE (g_date_get_type ())
|
||||||
#define G_TYPE_STRV (g_strv_get_type ())
|
#define G_TYPE_STRV (g_strv_get_type ())
|
||||||
#define G_TYPE_GSTRING (g_gstring_get_type ())
|
#define G_TYPE_GSTRING (g_gstring_get_type ())
|
||||||
|
|
||||||
@@ -73,6 +74,7 @@ void g_value_set_boxed_take_ownership (GValue *value,
|
|||||||
GType g_closure_get_type (void) G_GNUC_CONST;
|
GType g_closure_get_type (void) G_GNUC_CONST;
|
||||||
GType g_value_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_value_array_get_type (void) G_GNUC_CONST;
|
||||||
|
GType g_date_get_type (void) G_GNUC_CONST;
|
||||||
GType g_strv_get_type (void) G_GNUC_CONST;
|
GType g_strv_get_type (void) G_GNUC_CONST;
|
||||||
GType g_gstring_get_type (void) G_GNUC_CONST;
|
GType g_gstring_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
g_boxed_copy
|
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_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_closure_get_type G_GNUC_CONST
|
g_closure_get_type G_GNUC_CONST
|
||||||
|
Reference in New Issue
Block a user