[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: getting address of userdata
- From: Peter Odding <xolox@...>
- Date: Tue, 22 May 2007 03:36:36 +0200
Matthew Armstrong wrote:
I'm pretty sure the 'No such operator defined' error is coming from
as the userdata I'm running this on comes from a luabind created object.
If I temporarily remove the __tostring metamethod, the error goes away, so
that solves my problem.
Another thing luabind does is override the __eq metamethod, to what it
thinks == should be, which is a somewhat complicated definition. What if I
want to compare two userdata objects solely based on whether the references
Not sure whom you are asking, so just in case: I have no idea. Until 5 minutes
ago I didn't know about luabind ;) (and I wouldn't touch C++ with a ten-foot
pole). Good luck though.
- Peter Odding
PS. As a quick hack you could consider debug.getmetatable(foo).__eq = nil, which
should get you back to the default behavior.