repaired jsx:fold and moved some defines to jsx_decoder.hrl

This commit is contained in:
alisdair sullivan 2010-06-20 18:11:06 -07:00
parent cff4d17561
commit 5309030233
4 changed files with 26 additions and 19 deletions

View file

@ -83,6 +83,17 @@
).
%% two macros to simplify incomplete handling
-define(incomplete(Valid, Incomplete, Finish),
case Valid of
true -> {error, badjson}
; false -> {incomplete, Incomplete, Finish}
end
).
-define(ferror, fun() -> {error, badjson} end).
%% compilation macros for unified decoder
-ifdef(utf8).
-define(encoding, utf8).