lua-users home
lua-l archive

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


Hi folks,

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:

Lua lua(L);
LuaPrimitive v1 = lua["i"];
LuaPrimitive v2;
v2 = lua["i"];
v1 = v2;
lua.setGlobal("newglobal", "chunky bacon");
LuaTable t1 = lua["t1"];
v1 = t1["a"];
t1.setField("c", (LuaPrimitive) lua["i"]);
lua_getglobal(L, "f");
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: http://www.theess.com/assets/files/yalpp-0.1.zip

Greetings,
Jens