[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua registry ?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 1 Jun 2017 09:52:22 +0200
2017-06-01 0:26 GMT+02:00 J Doe <email@example.com>:
> On May 26, 2017, at 6:50 PM, Doug Currie <firstname.lastname@example.org> wrote:
> On Fri, May 26, 2017 at 10:40 PM J Doe <email@example.com> wrote:
>> I am currently reading "Lua Programming Gems" (2008), and had a rather
>> basic question about a term that is used.
>> The term appears in chapter 1, "Lua per-thread library context", on page
>> 5. The author mentions the "Lua registry":
> See https://www.lua.org/pil/27.3.html
> Hi Doug,
> Thanks for your post. I had a feeling it was to do with the C-side of
> things (as I read more of chapter 1), but wasn't entirely sure.
It has several applications, of which using it as a clipboard Lua table
by C routines is but one.However, if C is not involved at all, it is
not necessary to use it.
You can access it from Lua via the debug library. It's just a Lua
table that you can traverse with 'pairs' like any other. There are
some interesting things in it.