Tags: bycanvas/jiffy
Tags
Don't rely on an environment variable for Travis The environment variable approach breaks other projects' Travis-CI runs if they include other projects that depend on a different version of PropEr. Fixes: davisp#106
Account for char possibly being unsigned This sounds rather insane to me but I've managed to show that `(char) -1` is converted to 255 on some platforms. This was reproduced on ppc64el via Qemu on OS X. A simple program that does `fprintf(stderr, "%d\r\n", (char) -1);` prints 255 to the console. Rather than rely on the signedness of a char I've just updated things to use an unsigned char (which hopefully is never signed) and replaced -1 with 255 for the sentinel value when converting hex values. Thanks to Balint Reczey (@rbalint) for the report. Fixes davisp#74
Fix memory leak when encoding bare bignums This fixes a leak when encoding a bare bignum. Technically it would be possible to hit this memory leak randomly with bignums in objects but the chances are highly unlikely. Thanks to @miriampena for the issue. Fixes davisp#69
Persist the `val` register across yield The `val` variable is a register value that we need to be able to return at any time from `decode_iter`. If it happened that a yield was triggered while processing trailing whitespace the lack of persistance caused decode to return a term intialized from a random integer value. Obviously the Erlang VM did not enjoy this. Thanks to @michalpalka for the report. Fixes davisp#66
Improved Elixir compatibility This implements the `use_nil` option as discussed on issue davisp#64. Passing the atom `use_nil` as an option to both encode and decode will replace the atom `null` with `nil` when decoding and encode `nil` as `null` when encoding values. Fixes davisp#64 Fixes davisp#68
PreviousNext