lua-users home
lua-l archive

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


On Tue, Oct 09, 2001 at 04:54:04PM -0700, Brian Hook wrote:
> Is there a clean way of doing this or should I just handle the double
> indirection myself (i.e. the proxy is called back, and then it calls the
> real function with appropriately parsed args)?

> Is there a standard way of passing a "this" pointer when calling C++
> objects from Lua?  Right now I'm using a global, which seems rather
> nasty.

Is there a reason why you cannot use tolua? It would handle both your
problems perfectly for you, with a minimum of fuss. It basically uses
the proxy solution (which works for both the lua state and the "this"
pointer problem), and it generates all the proxy code automatically.

- Christian