mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Add support for G_TYPE_INT64 and storing it in GValue (Patch from Mathieu
Wed Oct 3 16:02:24 2001 Owen Taylor <otaylor@redhat.com> * glib-genmarshal.c gparamspecs.[ch] gvalue.h gobject/gvaluetypes.[ch]: Add support for G_TYPE_INT64 and storing it in GValue (Patch from Mathieu Lacage, #59254.)
This commit is contained in:
@@ -711,6 +711,41 @@ g_value_get_pointer (const GValue *value)
|
||||
return value->data[0].v_pointer;
|
||||
}
|
||||
|
||||
#ifdef G_HAVE_GINT64
|
||||
void
|
||||
g_value_set_int64 (GValue *value,
|
||||
gint64 v_int64)
|
||||
{
|
||||
g_return_if_fail (G_VALUE_HOLDS_INT64 (value));
|
||||
|
||||
value->data[0].v_int64 = v_int64;
|
||||
}
|
||||
|
||||
gint64
|
||||
g_value_get_int64 (const GValue *value)
|
||||
{
|
||||
g_return_val_if_fail (G_VALUE_HOLDS_INT64 (value), 0);
|
||||
|
||||
return value->data[0].v_int64;
|
||||
}
|
||||
|
||||
void
|
||||
g_value_set_uint64 (GValue *value,
|
||||
guint64 v_uint64)
|
||||
{
|
||||
g_return_if_fail (G_VALUE_HOLDS_UINT64 (value));
|
||||
|
||||
value->data[0].v_uint64 = v_uint64;
|
||||
}
|
||||
|
||||
guint64
|
||||
g_value_get_uint64 (const GValue *value)
|
||||
{
|
||||
g_return_val_if_fail (G_VALUE_HOLDS_UINT64 (value), 0);
|
||||
|
||||
return value->data[0].v_uint64;
|
||||
}
|
||||
#endif /* G_HAVE_GINT64 */
|
||||
|
||||
/* need extra includes for g_strdup_value_contents() ;( */
|
||||
#include "gobject.h"
|
||||
|
Reference in New Issue
Block a user