lua-users home
lua-l archive

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

 I am having trouble getting lua to compare my own C++ types.  I have a class called Handle that is simply a 32bit int that gets mapped to a pointer (Low 16bits for ID and high 16bit for a magic number).  When I push these on the stack to get compared, I believe they are getting compared by thier memory location.  Other than writing a function that compares two Handles, how can I get lua to compare them as if they are numbers, which they are?
Leigh McRae
Lead Programmer
Rockstar Games Toronto