lua-users home
lua-l archive

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


On Thu, Feb 14, 2008 at 10:39 PM, Graham Wakefield
<lists@grahamwakefield.net> wrote:
>
> In this case, couldn't you retrieve the static variable via a call through
> Lua?
>
> This could be via the C API, e.g pushing the static variable as a
> lightuserdata into LUA_REGISTRYINDEX.  If you know that matrix.so is loaded,
> then you can retrieve this pointer safely, no matter whether the symbol is
> global (in the C library sense) or not.
>

Not if dyld unloads the lib due to a lost symbol.  This is a
lower-level problem than what Lua could deal with at least in how the
code is structured right now.  That's an interesting approach though
to consider for a rev2.

wes