Re: Interfacing lua with C
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Interfacing lua with C
- From: "jimmyp_gr <jimmyp@...>" <jimmyp@...>
- Date: 2003年1月15日 12:33:50 -0000
Hi,
I just finished reading through the first two section of the reference
manual.So regarding my initial question:
> >I was wondering wether it's possible to do any of this in Lua:
> >1)'export' a C variable meaning that you create a lua var which is 'in
> >sync' with a C var.And what's more important...
>
> Yes. Use userdata containing the address of the C variable and add
metamethods
> to handle reading and writing to it.
I didn't see a metamethod for the assignment operator in the
manual.For reading I can use the function metamethod so that you can
read the value just by typing the name but what metamethod can I use
for writing to it?Can I define my own metamethods?Did I miss something
in the manual?
Dimitris