lua-users home
lua-l archive

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

Hi folks,

I'm having problems understanding the methods used to read and write C
variables from Lua. Specifically, I have a collection of, mostly static,
volatile variables which are normally simple integers:

	/* frames per second (RO in Lua) */
	/* set strictly from within this program */
	static volatile int fps  = 0;

	/* quit flag (RW in Lua) */
	/* may be set by this calling program OR from Lua */
	static volatile int quit = 0;

I presume that I need to use some sort of tag system and provide individual
read_var()/write_var() functions, but having tried various methods have only
succeeded in losing large quantities of hair and having to reboot the system
sever times.

Any help greatly appreciated.

Alan McFarlane