lua-users home
lua-l archive

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


Hello,

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.

At the moment i'm using an hash table for all my own userdata,
lookup the pointer there and if found i get a verification that this
userdata is really a "Foobar" struct.

Is there any better way ?


-- 
 Best regards,                        emailto: scholz at scriptolutions dot com
 Lothar Scholz                        http://www.ruby-ide.com
 CTO Scriptolutions                   Ruby, PHP, Python IDE 's