[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: help with callbacks
- From: Javier Guerra Giraldez <javier@...>
- Date: Sun, 19 Aug 2007 20:52:37 -0500
On Sunday 19 August 2007, Merick wrote:
> The gui lib I'm using sends arguments to the callback function, and one
> of them is a pointer. In FreeBasic most (but not all) pointers are just
> an integer, so I'm thinking that it might be possible to store the
> results from lua_ref() into a hash table using that number as the key,
> then in the callback function I would be able to use that hashtable with
> lua_getref and pcall to run the function from the script
that's exactly what luaL_ref() does: stores any Lua value into a hash table,
and gives you an integer to retrieve it later.
--
Javier
Attachment:
pgpQJL2HQAQoc.pgp
Description: PGP signature