lua-users home
lua-l archive

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

2012/1/4 Asim <>:

> I want to write a C function that returns a sequence of bytes.  This
> function should be called from Lua.  There are two options for the type of
> return value in Lua - userdata and string.

Your main concern should be clarity, not speed.  Is it conceivable
that you would wish to concatenate two of your bytesequences to form a
third?  If yes, by all means return a string.  If no, do it as