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:31 PM, Matt Campbell <mattcampbell@pobox.com> wrote:
> > static const char * Matrix_udata::name
>
>  I'm guessing that this is the name of the metatable for the matrix
>  userdata.  If so, it seems to me that this constant should be exported
>  as a #define in a shared header file, not as a symbol in a shared
>  library.  Of course, my guess could be entirely wrong.
>

Yeah, you need a bit more context.  A #define would never work how I
use this symbol.  I actually use the address of Matrix_udata::name as
an int in the class' metatable to check if it's a valid instance of
the class.  I need the memory location, not so much the actual string.

wes