lua-users home
lua-l archive

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


It pushes a void* on the stack(which should not be a problem) but
I think lua_newuserdata is what you seek.

To stop your userdata being collected you can use lua_ref().

You will need to read the manual.

Better still buy the book.

db


On Wed, 24 Nov 2004 02:44:59 -0800 (PST), JAST <jastejada@yahoo.com> wrote:
> 
> Hello everyone!
> Warning! New Lua User
> I need a dynamically allocated buffer for a unicode string in win32
> is there a lua API function to alloc a memory buffer inside a cfunction
> and let the garbage collector free it later
> (function that does not push something to the statck)
> 
>  ________________________________
> Do you Yahoo!?
>  Read only the mail you want - Yahoo! Mail SpamGuard. 
> 
>