lua-users home
lua-l archive

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


Actaully, I'm not sure. I suppose I should have taken the time to look
closer at the part of the manual about tags. :) I think I'll do that right
now.

Thanks, Philip Bock

----- Original Message -----
From: "Edgar Toernig" <froese@gmx.de>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Monday, November 19, 2001 9:28 PM
Subject: Re: Userdata and methods


> Philip Bock wrote:
> >
> >   if ((lua_gettop(client_state) >= 5) && lua_isuserdata(client_state,
1))
> >  {
> >   Viewport *this_viewport = (Viewport *) lua_touserdata(client_state,
1);
> >
> > The program gives a segmentation fault at the first attempt to access
> > this_viewport after it is initialized. Anyone have any ideas? I'm new to
> > Lua, so it's probably just a stupid mistake. Thanks, Philip Bock.
>
> Hmm... looks sane.  Are you sure, your lua_pushusertag is correct?  Or
that
> you get the right userdata object (you don't check the tag)?
>
> Ciao, ET.
>
>