On Mon, Aug 25, 2014 at 9:22 AM, Philipp Janda <
siffiejoe@gmx.net> wrote:
> The string library doesn't make sense for generic userdata, it only makes
> sense for character arrays a.k.a buffers. That's why I suggested you write a
> buffer userdata type. And please don't try to replace the string library
> with your own version. Just take `lstrlib.c`, replace `luaL_checkstring`
> with `luaL_checkudata`, and register those functions as methods of your
> buffer userdata. Yes, you duplicate a lot of code, but you stay backwards
> compatible with current Lua, and you stay type-safe.
Yes, this is what's expected -- I just disagree with the code