lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 3 January 2011 11:34, Richard Hundt <richardhundt@gmail.com> wrote:
> Hi List,
>
> I thought I'd throw this little lib over the wall in the hope that somebody
> finds it useful:
>
> https://github.com/richardhundt/lua-marshal

I noticed one bug - tbl_marshal doesn't check its argument type which
results in a segfault if you pass it something which isn't a table.

I'm not entirely sure about the current error policy. Attempts to
marshal a LUA_TTHREAD just result in a nil being stored, while
persisting a C function raises an error. The attempts to marshal and
unmarshal functions of course fail on LuaJIT 2 (probably lua-marshal
should at least check the lua_dump return value).

This seems like a very handy library. Thanks to Alexander for
contributing the benchmarks.

Alex