diff options
author | Petri Lehtinen <petri@digip.org> | 2009-09-08 17:02:39 +0300 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2009-09-08 17:02:39 +0300 |
commit | 55d25665395551e711fa7d971cf76c8acf0b17f1 (patch) | |
tree | 981bcca69d805b4382ae1e51d8c4a76e0db1510f /src | |
parent | 7ee974e91c05d334b3a186937916bc843c537b8e (diff) | |
parent | 9cc6fbe58024d63473846ddb424a69b7efc03b90 (diff) | |
download | jansson-55d25665395551e711fa7d971cf76c8acf0b17f1.zip jansson-55d25665395551e711fa7d971cf76c8acf0b17f1.tar.gz jansson-55d25665395551e711fa7d971cf76c8acf0b17f1.tar.bz2 |
Merge branch '1.0' into HEAD
Conflicts:
configure.ac
doc/conf.py
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/load.c | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 50b1e69..5165476 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,6 +13,6 @@ libjansson_la_SOURCES = \ utf.h \ util.h \ value.c -libjansson_la_LDFLAGS = -version-info 0:1:0 +libjansson_la_LDFLAGS = -version-info 0:2:0 AM_CFLAGS = -Wall -Wextra -Werror @@ -133,10 +133,7 @@ static char stream_get(stream_t *stream, json_error_t *error) c = stream->buffer[0]; - if(c == EOF && stream->eof(stream->data)) - return EOF; - - if(c < 0) + if(c < 0 && c != EOF) { /* multi-byte UTF-8 sequence */ int i, count; @@ -256,11 +253,11 @@ static void lex_scan_string(lex_t *lex, json_error_t *error) lex->value.string = NULL; lex->token = TOKEN_INVALID; - /* skip the " */ c = lex_get_save(lex, error); while(c != '"') { if(c == EOF) { + lex_unget_unsave(lex, c); if(lex_eof(lex)) error_set(error, lex, "premature end of input"); goto out; |