antirez/lua-cmsgpack — pull request #16 by puppi (2012-06-18 22:46:17+00:00)
Title: Improvements and fixes

My fork was initially motivated by a bug I pointed out in issue #15. I've corrected it, fixed a few minor bugs (such as a mistake in table_is_an_array()) and also addressed issue #10, implementing support for packing and unpacking streams of objects.
As you can read in more detail in README.md, cmsgpack.pack() now takes 0 or more arguments and returns the equivalent MessagePack stream (the concatenation of individual serializations). cmsgpack.unpack() now returns a variable number of values, corresponding to each object in the stream (thus the error "Unused bytes in string" isn't thrown anymore). This is a different approach than the one you pointed in response to issue #10, but I believe it is simpler for the user and more Lua-like, besides being marginally more efficient.

I have also made the module compatible with Lua 5.2 without compromising Lua 5.1 compatibility. Note, however, that in order to isolate the macros used to address that and issue #15 I've created a header file. I've also moved text which was previously contained in comments in the *.c file and in the readme to COPYING, AUTHORS and NEWS, besides citing myself as a contributor in AUTHORS. The creation of these new files goes against your original approach of having a single self-contained C file, so you should take that into account before deciding to accept the pull request (you can also simply "remerge" the files, of course).