[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Q. Accessing volatile variables
- From: "Alan McFarlane" <amcfarlane@...>
- Date: Tue, 21 May 2002 21:56:27 +0100
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
amcfarlane_at_bigfoot_dot_com