[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.3 Suggestion: extend lua_(get|set)uservalue() to associate userdata-to-userdata
- From: Coda Highland <chighland@...>
- Date: Sun, 1 Dec 2013 21:27:51 -0800
On Sun, Dec 1, 2013 at 7:52 PM, Sir Pogsalot <sir.pogsalot@gmail.com> wrote:
> Also, Coda, I said in my original posting that would seem a bit unclear to
> store the hidden userdata within a table to associate to the userdata that
> gets exposed. It makes its access weirder and a bit unclear to someone
> reviewing the code later -- I'm just wondering if pucrio can comment on if
> this would be a simple addition that would make sense. If anything, storing
> it in a table would mean using more memory (assuming this suggestion is
> possible).
Wrap the assignment and access in functions to make the intent and
behavior more obvious. The memory usage difference isn't THAT bad, I
mean, how many of these things are you creating?
/s/ Adam