lua-users home
lua-l archive

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


Lothar Scholz wrote:
This is a newbies question: If i create multiple userdata objects,
what the best way to find out if that userdata pointer that i get from
the stack belongs to my "Foobar" c struct.

A fast way could be packing an integer id together with the pointer in the userdata object (not a light userdata, which is just a pointer if I remember correctly).

  Enrico