[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Basic math
- From: skaller <skaller@...>
- Date: 31 Dec 2004 09:06:24 +1100
On Thu, 2004-12-30 at 19:33, Asko Kauppi wrote:
> For the needs C API has been designed, I think there just isn't any use
> for those. There's C side, and there's Lua side. Of course, you can
> 'getnumber' and add and 'pushnumber', but the additions happen then in
> C.
Yes but this does not obey Lua rules -- it doesn't consult
metatables etc.
This is weird.. I can call arbitrary functions including
sin and cos .. but I can't add?
hmmm.. I guess I could use lua_load to define + - * / ..
as library functions in the global table and then
wrap C API table calls to get lua_add, lua_sub etc ..
--
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850,
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net