Tags: karelwar/jiffy
Tags
No longer escape forward slashes After a few requests and some reflection I've decided to stop escaping forward slashes in strings while still accepting the escaped version through the decoder. This appears to mimic the behavior of other popular JSON libraries I've checked (Ruby and Python).
Make PropEr a soft dependency This prevents applications that depend on Jiffy from requiring PropEr as a dependency just to run Jiffy's full test suite. If you want to run the full test suite you'll have to run Jiffy's Makefile directly which creates a `.jiffy.dev` marker that enables the full test suite.
Fix code reloading for Jiffy As it turns out I did not understand the documenation for load/upgrade/unload correctly. load/upgrade are called conditionally if there's code in the VM for the NIF. Ie, no code means load is called, where as if code exists, upgrade is called. unload is called regardless once per load/unload. This means that load/upgrade in Jiffy's case will each create a state object and unload will free it each time. I was missing the fact that unload is called every time and hence I don't need to clear the state in upgrade.