lua-users home
lua-l archive

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


On 28/06/14 14:39, Luiz Henrique de Figueiredo wrote:
> 
>> how I handle such things is to use a simple program that converts the
>> Lua script into a C character array like:
> 
> I use this:
> 	xxd -i foo.lua | sed 's/unsigned/static const unsigned/' > foo.h
> 
> Then foo.h contains this:
> 
> 	static const unsigned char foo_lua[] = {
> 		...
> 	};
> 	static const unsigned int foo_lua_len = 403;
> 
> which you can use to call luaL_loadbuffer.
> 

I am surprised you do not run your lstrip library before xxd.

-- 
Liam

Attachment: signature.asc
Description: OpenPGP digital signature