[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Re[2]: exporter
- From: "Sebastien Gerin" <sgerin@...>
- Date: Wed, 29 May 2002 12:53:02 +0200
> Denis Andreev wrote:
> I think you must look at luna. Search for it on lua-users.org
after looking Luna, somethinf is still bothering me ... :)
function that are exported to Lua like "Account" or "deposit" are made of
lua expressions (lua_tonumber...), lua can evaluate these registerd
functions.
Is there a way to export "real" C++ (or C) function to lua ? How lua can
interpret it ?
For example : in lua's doc, there is a function "foo", which is registerd as
"average". Is it possible to register a C function "int average(int a, int
b) { return (a+b)/2;}" to lua ?
I think it's possible because, it is done in the Flat Four Engine
(http://www.379.com/f4/) ...
hope someone could help me ...
thx