projects
/
jansson.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '1.3'
[jansson.git]
/
src
/
load.c
diff --git
a/src/load.c
b/src/load.c
index
2a360ff
..
925a850
100644
(file)
--- a/
src/load.c
+++ b/
src/load.c
@@
-401,7
+401,7
@@
out:
free(lex->value.string);
}
free(lex->value.string);
}
-#if
def
JSON_INTEGER_IS_LONG_LONG
+#if JSON_INTEGER_IS_LONG_LONG
#define json_strtoint strtoll
#else
#define json_strtoint strtol
#define json_strtoint strtoll
#else
#define json_strtoint strtol
@@
-811,15
+811,13
@@
static int string_eof(void *data)
return (stream->data[stream->pos] == '\0');
}
return (stream->data[stream->pos] == '\0');
}
-json_t *json_loads(const char *string, json_error_t *error)
+json_t *json_loads(const char *string,
size_t flags,
json_error_t *error)
{
lex_t lex;
json_t *result;
{
lex_t lex;
json_t *result;
+ (void)flags; /* unused */
- string_data_t stream_data = {
- .data = string,
- .pos = 0
- };
+ string_data_t stream_data = {string, 0};
if(lex_init(&lex, string_get, string_eof, (void *)&stream_data))
return NULL;
if(lex_init(&lex, string_get, string_eof, (void *)&stream_data))
return NULL;
@@
-840,10
+838,11
@@
out:
return result;
}
return result;
}
-json_t *json_loadf(FILE *input, json_error_t *error)
+json_t *json_loadf(FILE *input,
size_t flags,
json_error_t *error)
{
lex_t lex;
json_t *result;
{
lex_t lex;
json_t *result;
+ (void)flags; /* unused */
if(lex_init(&lex, (get_func)fgetc, (eof_func)feof, input))
return NULL;
if(lex_init(&lex, (get_func)fgetc, (eof_func)feof, input))
return NULL;
@@
-864,7
+863,7
@@
out:
return result;
}
return result;
}
-json_t *json_load_file(const char *path, json_error_t *error)
+json_t *json_load_file(const char *path,
size_t flags,
json_error_t *error)
{
json_t *result;
FILE *fp;
{
json_t *result;
FILE *fp;
@@
-879,7
+878,7
@@
json_t *json_load_file(const char *path, json_error_t *error)
return NULL;
}
return NULL;
}
- result = json_loadf(fp, error);
+ result = json_loadf(fp,
flags,
error);
fclose(fp);
return result;
fclose(fp);
return result;