24
24
#include "signon-utils.h"
26
#ifdef ENABLE_PYGOBJECT_HACK
28
signon_demarshal_joined_values (const gchar *key,
32
/* Hack to support marshalling of string arrays in python. See also the
33
* "GI overrides" file in the pygobject directory */
35
const gchar *full_string, *joined_values;
38
full_string = g_value_get_string (value);
39
if (full_string == NULL || !g_str_has_prefix (full_string, "pySignon"))
42
separator[0] = full_string[8];
44
joined_values = full_string + 9;
45
values = g_strsplit (joined_values, separator, 0);
47
copy_value = g_slice_new0 (GValue);
48
g_value_init (copy_value, G_TYPE_STRV);
49
g_value_take_boxed (copy_value, values);
51
g_hash_table_insert (dest, g_strdup(key), copy_value);
56
26
static void signon_copy_gvalue (gchar *key,
60
#ifdef ENABLE_PYGOBJECT_HACK
61
if (G_VALUE_HOLDS_STRING(value) &&
62
signon_demarshal_joined_values (key, value, dest)) return;
65
30
GValue *copy_value = g_slice_new0 (GValue);
66
31
g_value_init (copy_value, value->g_type);
67
32
g_value_copy (value, copy_value);