mirror of
https://github.com/json-c/json-c.git
synced 2026-11-09 07:20:15 +08:00
Merge branch 'remicollet-issue-float'
Conflicts: json_util.c
This commit is contained in:
commit
5b36a432c8
8 files changed
+85
-4
No files matched your search
@@ -146,6 +146,11 @@ int json_object_to_file(char *filename, struct json_object *obj)
|
||||
return json_object_to_file_ext(filename, obj, JSON_C_TO_STRING_PLAIN);
|
||||
}
|
||||
|
||||
int json_parse_double(const char *buf, double *retval)
|
||||
{
|
||||
return (sscanf(buf, "%lf", retval)==1 ? 0 : 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Not all implementations of sscanf actually work properly.
|
||||
* Check whether the one we're currently using does, and if
|
||||
|
||||
Reference in new issue
Block a user