lua-users home
lua-l archive

Re: Pooling of strings is good

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


On Sun, Aug 24, 2014 at 6:44 PM, Tim Hill <drtimhill@gmail.com> wrote:
> So override __tostring() in your userdata metatable. And if it’s a userdata supplied by someone else then they probably don’t want you messing around inside it. There is good reason for this; userdata is MEANT to be opaque to Lua code.
I'm not sure how many times I can tell different people I understand
that userdata is meant to be opaque before it gets annoying :p
I will look into what I can do with __tostring, but right now I think
I still have to convert it *to* a string.... hrrm.

AltStyle によって変換されたページ (->オリジナル) /