[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: default table in C functions
- From: Drake Wilson <drake@...>
- Date: Wed, 5 Jan 2011 10:01:00 -0700
Quoth jseb <gmane2010@finiderire.com>, on 2011-01-05 17:38:53 +0100:
> Hello,
>
> I call my function like this:
>
> gl:md2_display(model.get_data())
>
> Where "gl" is the C module.
The syntax above looks almost exactly backwards. You might consider
tweaking your function signatures to make it
gl.md2_display(model:get_data())
instead, if I'm inferring correctly that 'gl' is essentially a module
and 'model' is an object-like entity that has methods attached to it
(i.e., you could write « model2:get_data() » as well, but there is no
other way of calling md2_display). This would be more consistent with
other usages of Lua as well as the intended semantics of dot versus
colon.
---> Drake Wilson