Fix gsettings mapping for uint64

Bug #616295.
This commit is contained in:
Christian Persch 2010-04-20 19:39:03 -04:00 committed by Matthias Clasen
parent 1b61680abb
commit 9488d18a87
2 changed files with 4 additions and 4 deletions

View File

@ -137,7 +137,7 @@ g_settings_set_mapping_unsigned_int (const GValue *value,
const GVariantType *expected_type)
{
GVariant *variant = NULL;
gulong u;
guint64 u;
if (G_VALUE_HOLDS_UINT (value))
u = g_value_get_uint (value);
@ -283,7 +283,7 @@ g_settings_get_mapping_unsigned_int (GValue *value,
GVariant *variant)
{
const GVariantType *type;
gulong u;
guint64 u;
type = g_variant_get_type (variant);

View File

@ -827,11 +827,11 @@ test_simple_binding (void)
g_object_set (obj, "uint64", (guint64) G_MAXUINT64, NULL);
g_settings_get (settings, "uint64", "t", &u64);
g_assert_cmpint (u64, ==, G_MAXUINT64);
g_assert_cmpuint (u64, ==, G_MAXUINT64);
g_settings_set (settings, "uint64", "t", (guint64) G_MAXINT64);
g_object_get (obj, "uint64", &u64, NULL);
g_assert_cmpint (u64, ==, G_MAXINT64);
g_assert_cmpuint (u64, ==, (guint64) G_MAXINT64);
g_settings_bind (settings, "string", obj, "string", G_SETTINGS_BIND_DEFAULT);