summaryrefslogtreecommitdiff
path: root/json-glib/json-generator.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@openedhand.com>2007-11-21 14:52:15 +0000
committerEmmanuele Bassi <ebassi@openedhand.com>2007-11-21 14:52:15 +0000
commit557a60b4e0f1fd6fc0fa79efc60f9bfd777e0670 (patch)
tree0fa67ef59d332b6a488327df4e2047dcafb6b715 /json-glib/json-generator.c
parent5fc37f8f2a1594821623419f75ceaa4b95fe07cf (diff)
downloadjson-glib-557a60b4e0f1fd6fc0fa79efc60f9bfd777e0670.tar.gz
Use a unicode character for the indent-char property of JsonGenerator
The indent character should be any Unicode character available instead of a generic char.
Diffstat (limited to 'json-glib/json-generator.c')
-rw-r--r--json-glib/json-generator.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/json-glib/json-generator.c b/json-glib/json-generator.c
index 3b1a5b4..dbe8709 100644
--- a/json-glib/json-generator.c
+++ b/json-glib/json-generator.c
@@ -41,7 +41,7 @@ struct _JsonGeneratorPrivate
JsonNode *root;
guint indent;
- gchar indent_char;
+ gunichar indent_char;
guint pretty : 1;
};
@@ -101,7 +101,7 @@ json_generator_set_property (GObject *gobject,
priv->indent = g_value_get_uint (value);
break;
case PROP_INDENT_CHAR:
- priv->indent_char = g_value_get_char (value);
+ priv->indent_char = g_value_get_uint (value);
break;
case PROP_ROOT:
json_generator_set_root (JSON_GENERATOR (gobject),
@@ -130,7 +130,7 @@ json_generator_get_property (GObject *gobject,
g_value_set_uint (value, priv->indent);
break;
case PROP_INDENT_CHAR:
- g_value_set_char (value, priv->indent_char);
+ g_value_set_uint (value, priv->indent_char);
break;
case PROP_ROOT:
g_value_set_boxed (value, priv->root);
@@ -203,11 +203,11 @@ json_generator_class_init (JsonGeneratorClass *klass)
*/
g_object_class_install_property (gobject_class,
PROP_INDENT_CHAR,
- g_param_spec_char ("indent-char",
- "Indent Char",
- "Character that should be used when indenting",
- 0, 255, ' ',
- G_PARAM_READWRITE));
+ g_param_spec_unichar ("indent-char",
+ "Indent Char",
+ "Character that should be used when indenting",
+ ' ',
+ G_PARAM_READWRITE));
}
static void