lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, 8 Nov 2008 22:37:25 +0100
"Ben Aurel" <ben.aurel@gmail.com> wrote:

> hi
> There are a lot of projects (most of them in alpha/beta state) and
> tutorials around. Luabind looks interesting but since I don't intend
> to work with C++ there would some overhead. What do you (experienced
> lua user) use when extending Lua with C? Any advice or links are
> appreciated.

Not meaning to sound like a wise guy or nerd, it really just takes the
manuals at http://www.lua.org/manual/5.1/ . It gives you the most
direct and straightforward, and an otherwise painless and hassle-free
interface to the interpreter. As a bonus, you can normally rely on
Lua's resource management and referencing scheme, and even share Lua's
exception handling, as it bails out with a non-local jump and cleans up
the mess behind you if resource allocation fails deeply nested in your
code, for example. If you don't insist on wrapping existing library
calls automatically, you should give it a try by hand.

- Timm

-- 
Timm S. Mueller <tmueller@neoscientists.org>