lua-users home
lua-l archive

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


> 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.