lua-users home
lua-l archive

Re: Simple lua code crashing...

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

AltStyle によって変換されたページ (->オリジナル) /