[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Simple lua code crashing...
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 28 Jun 2014 10:39:26 -0300
> 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.