Re: Another userdata question
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Another userdata question
- From: Sean Conner <sean@...>
- Date: 2013年11月16日 22:26:31 -0500
I just realized there's a bug in the code I submitted. Where I originally
wrote:
> button = lua_newuserdata(L,sizeof(OSLIB_OBJECT));
> memset(button,0,sizeof(OSLIB_OBJECT));
> *button = createObject(LIB_GRAPHICS_BUTTON,name);
should be:
button = lua_newuserdata(L,sizeof(OSLIB_OBJECT *));
*button = createObject(LIB_GRAPHICS_BUTTON,name);
The rest of the code should be okay.
-spc (Sorry about that)