Merge branch 'remicollet-issue-float'
Conflicts: json_util.c
This commit is contained in:
@@ -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