[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: A new c++ binding
- From: Jens Theeß <j.theess@...>
- Date: Sat, 17 Jun 2006 18:32:44 +0200
I started a new c++ binding to lua 5.1 called yalpp (yet another lua++).
It is somewhat influenced by the old lua++ for lua 3.1. It abstracts
away dealing with the stack but does not hide it, therefore it can
interoperate with code using the standard lua api. All interaction with
lua through yalpp leaves the stack balanced.
Some example code:
LuaPrimitive v1 = lua["i"];
v2 = lua["i"];
v1 = v2;
lua.setGlobal("newglobal", "chunky bacon");
LuaTable t1 = lua["t1"];
v1 = t1["a"];
t1.setField("c", (LuaPrimitive) lua["i"]);
lua_call(L, 0, 0);
v1 = lua["str"];
There's still a lot to do, stuff like wrapping functions, error handling
(exceptions) and general clean-up. But with summer finally arriving in
Germany, I thought I'd rather publish it in it's current state than
waiting till fall :) Comments are very much welcome.
You can download it here for now, I haven't put up a page yet: