[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Caveat with lua_pushlightuserdata(L, (void *)&key)
- From: Glenn Maynard <glenn@...>
- Date: Tue, 27 Jun 2006 20:45:16 -0400
On Tue, Jun 27, 2006 at 06:35:56PM -0400, Diego Nehab wrote:
> Don't you have to declare the variable static? Otherwise I
> believe it's ok to leave the value uninitialized (at least in C).
Not in a global scope; global variables are always initialized.
You're thinking of a local scope, where static causes the variable
to not be stored on the stack.
--
Glenn Maynard
- References:
- Caveat with lua_pushlightuserdata(L, (void *)&key), Mike Pall
- Re: Caveat with lua_pushlightuserdata(L, (void *)&key), Julien Cugnière
- Re: Caveat with lua_pushlightuserdata(L, (void *)&key), Andreas Stenius
- Re: Caveat with lua_pushlightuserdata(L, (void *)&key), David Jones
- Re: Caveat with lua_pushlightuserdata(L, (void *)&key), Glenn Maynard
- Re: Caveat with lua_pushlightuserdata(L, (void *)&key), Roberto Ierusalimschy
- Re: Caveat with lua_pushlightuserdata(L, (void *)&key), Mike Pall
- Re: Caveat with lua_pushlightuserdata(L, (void *)&key), David Given
- Re: Caveat with lua_pushlightuserdata(L, (void *)&key), Diego Nehab