[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is the registry needed?
- From: Sean Conner <sean@...>
- Date: Wed, 30 Sep 2015 11:56:33 -0400
It was thus said that the Great Soni L. once stated:
>
> In Lua you have 2 options:
>
> 1) Use function upvalues. (for local access)
>
> 2) Use the module table. (for shared access)
>
> There's no such thing as a "registry" in Lua, it only exists in C (and
> debug). I want to bring Lua on par with the C API and vice-versa.
I think I may have mentioned this before, but wrap Lua in Lua.
lua = require "lua"
L = lua.Lnewstate()
L:Lopenlibs()
L:getglobal("print")
L:push("this is a string")
L:call(1,0)
Short of that, what's in the C API that isn't available from Lua?
-spc (debug.getregistry() called. It's a bit miffed)