summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 31baf87)
raw | patch | inline | side by side (parent: 31baf87)
author | David Schleef <ds@schleef.org> | |
Mon, 22 Dec 2003 19:28:07 +0000 (19:28 +0000) | ||
committer | David Schleef <ds@schleef.org> | |
Mon, 22 Dec 2003 19:28:07 +0000 (19:28 +0000) |
Original commit message from CVS:
Print double ranges in a locale-friendly way
Print double ranges in a locale-friendly way
gst/gstvalue.c | patch | blob | history |
diff --git a/gst/gstvalue.c b/gst/gstvalue.c
index 29ba90e796280aa591725b46fd4c9c907ebd8432..48fe437a65385af0c1606dd14bf5511b2525ebc4 100644 (file)
--- a/gst/gstvalue.c
+++ b/gst/gstvalue.c
gst_value_transform_double_range_string (const GValue *src_value,
GValue *dest_value)
{
- dest_value->data[0].v_pointer = g_strdup_printf("[%g,%g]",
- src_value->data[0].v_double, src_value->data[1].v_double);
+ char s1[G_ASCII_DTOSTR_BUF_SIZE],s2[G_ASCII_DTOSTR_BUF_SIZE];
+
+ dest_value->data[0].v_pointer = g_strdup_printf("[%s,%s]",
+ g_ascii_dtostr (s1, G_ASCII_DTOSTR_BUF_SIZE,
+ src_value->data[0].v_double),
+ g_ascii_dtostr (s2, G_ASCII_DTOSTR_BUF_SIZE,
+ src_value->data[1].v_double));
}
static void