mirror of
https://github.com/json-c/json-c.git
synced 2026-03-24 07:29:07 +08:00
@@ -67,6 +67,7 @@ set(JSON_C_SOURCES
|
||||
./linkhash.c
|
||||
./printbuf.c
|
||||
./random_seed.c
|
||||
./strerror_override.c
|
||||
)
|
||||
|
||||
add_library(json-c
|
||||
|
||||
@@ -195,7 +195,9 @@ int json_object_to_file(const char *filename, struct json_object *obj)
|
||||
|
||||
int json_parse_double(const char *buf, double *retval)
|
||||
{
|
||||
return (sscanf(buf, "%lf", retval)==1 ? 0 : 1);
|
||||
char *end;
|
||||
*retval = strtod(buf, &end);
|
||||
return end == buf ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user