lua-users home
lua-l archive

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

On Thu, 4 Jun 2009 17:30:10 -0700
Graham Wakefield <> wrote:
> Just wondering if any lua guru can suggest a way I might retrieve the 
> top-level lua_State pointer in a module's C function.

The global state keeps a pointer to mainthread. So G(L)->mainthread.

-- tom