lua-users home
lua-l archive

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


AFAIK the registry is inaccessible by Lua code.  Therefore if you have C
side data then the best place for it (under common usages) would be in the
registry.  Of course "all generalizations are wrong", YMMV, and references
outside the registry to objects "in" the registry of course can make those
objects accessible to Lua code.

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Matthew Harmon
Sent: Friday, August 13, 2004 8:26 AM
To: 'Lua list'
Subject: GLOBALS vs. REGISTRY


Hi all.

I need to store a pointer to the C++ object that is managing a
script/thread/state.  I'm a bit confused over what best practice is for
this.  I was originally storing it in the GLOBALS table, but the docs imply
a better place for it is in the REGISTRY table.  Is this just to avoid
polluting the GLOBALS, or is there some other mechanism I should be aware of
here?

Thanks a bunch.