[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: request for interest/participants: another lua C++ binding
- From: Oliver Schoenborn <oliver.schoenborn@...>
- Date: Sat, 08 Apr 2006 10:13:12 -0400
Matt Campbell wrote:
Hello Olver:
Your sample code looks nice, except for one fundamental problem. It
assumes either a single, global Lua state, or something less portable
such as thread-local storage (which I use in my current Windows-only
project).
I would suggest adding "LuaInterpreter& L" as the first argument to
registered functions, and changing the current global utility
functions such as luaReturn to LuaInterpreter methods. This way, your
C++ binding framework would support multiple Lua states in a portable
way.
Yes, an important consideration, and there are ways to "keep it out of
the way" but make it available if necessary (see next post). Thanks for
the feedback.
Oliver