mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
spa: add locale independent spa_dtoa
And use this in spa_json_format_float() where we also avoid invalid json floats. Use json float format in some places where we serialize json floats. Add a unit test. See #2223
This commit is contained in:
parent
5f4d031db0
commit
2b16df4e89
6 changed files with 40 additions and 13 deletions
|
|
@ -280,7 +280,7 @@ static void put_double(struct data *d, const char *key, double val)
|
|||
{
|
||||
char buf[128];
|
||||
put_fmt(d, key, "%s%s%s", NUMBER,
|
||||
spa_json_format_double(buf, sizeof(buf), val), NORMAL);
|
||||
spa_json_format_float(buf, sizeof(buf), val), NORMAL);
|
||||
}
|
||||
|
||||
static void put_value(struct data *d, const char *key, const char *val)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue