Re: Wrong userdata pointer returned since update to luabind 0.9

Stefan Reusch <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
One little question ...

It is possible to do something like this without wrap_base

C++
struct A {
luabind::object onclick;
}

.def_readwrite("OnClick", &A::onclick)

LUA
a = A()
a.onclick = function print("hello") end


2010/2/24 Daniel Wallin <[email protected]>:
> On Wed, Feb 24, 2010 at 06:24:26PM +0100, Stefan Reusch wrote:
>> ahh, i forgot. the line with touserdata has worked with the old
>> version, definitly.
>
> OK, I see what's going on now. In pre-0.9, object_rep had a pointer to
> the held C++ object as its first member, so this "worked" by coincidence
> when getting the raw userdata pointer.
>
> --
> Daniel Wallin
> BoostPro Computing
> http://www.boostpro.com
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> luabind-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.