lua-users home
lua-l archive

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


On Mon, 12 Apr 2010 18:20:13 +0200
"Timm S. Mueller" <tmueller@schulze-mueller.de> wrote:

> > when I use luaL_ref() on a string that is on top of the stack, and then obtain a pointer
> > to this string. Is this pointer guaranteed to be valid until I call luaL_unref() or could
> > the string be moved to an other memory location across function calls?
> 
> Userdata doesn't travel. This is safe.

I misread the string part, but it should be still safe. :-)

- Timm

-- 
Timm S. Mueller <tmueller@schulze-mueller.de>
Schulze & Mueller GbR, Gryphiusstr. 2, 10245 Berlin,
Gesellschafter: Franciska Schulze, Timm S. Mueller,
Tel. +49 30 93624410, http://www.schulze-mueller.de/