projects
/
jansson.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
6ecba84
)
ANSI C requires struct initializers to be constant expressions
author
Petri Lehtinen
<petri@digip.org>
Mon, 21 Mar 2011 07:27:51 +0000
(09:27 +0200)
committer
Petri Lehtinen
<petri@digip.org>
Mon, 21 Mar 2011 07:28:14 +0000
(09:28 +0200)
Closes GH-17.
src/load.c
patch
|
blob
|
history
diff --git
a/src/load.c
b/src/load.c
index
262bd7d
..
3cc7d0f
100644
(file)
--- a/
src/load.c
+++ b/
src/load.c
@@
-839,10
+839,13
@@
json_t *json_loads(const char *string, size_t flags, json_error_t *error)
{
lex_t lex;
json_t *result;
- string_data_t stream_data
= {string, 0}
;
+ string_data_t stream_data;
(void)flags; /* unused */
+ stream_data.data = string;
+ stream_data.pos = 0;
+
if(lex_init(&lex, string_get, (void *)&stream_data))
return NULL;