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]> |
When i try to call this function from c++
if(pLuaWnd->onclick && luabind::type(pLuaWnd->onclick) == LUA_TFUNCTION) {
luabind::call_function<void>(pLuaWnd->onclick);
}
then i get an access error here
inline void handle::push(lua_State* interpreter) const
{
lua_rawgeti(interpreter, LUA_REGISTRYINDEX, m_index);
}
The error comes, if object initialised from lua or not. This object
has some randomized values and is not initialised correct by luabind.
Any ideas or something which i cant see?
2010/2/24 Daniel Wallin <[email protected]>:
> On Wed, Feb 24, 2010 at 07:53:01PM +0100, Stefan Reusch wrote:
>> 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
>
> It should be. Doesn't that work?
>
> --
> Daniel Wallin
> BoostPro Computing
> http://www.boostpro.com
>
> ------------------------------------------------------------------------------
> Download Intel® 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® 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