|
On Mon, Jul 27, 2009 at 2:17 AM, Phoenix Sol<phoenix@burninglabs.com> wrote:Yep, it should be a light userdata, and is working for me. :-)
>
>> Are you using the "pointer" type in both the callback's and the C
>> function's signatures?
>
> Yes, Fabio. You seem to imply that it should work; perhaps I have overlooked
> something.
>
> In my callback function, should type(my_pointer_arg) == 'userdata'?
Remember that the first type you pass to alien.callback is the return
type, not the type of the first argument:
function foo(ud)
-- do something with userdata ud
return 0
end
foo_cb = alien.callback(foo, "int", "pointer")
--
> Currently, it is 'number'. I'm certain that it should be receiving a
> pointer.
>
> Thanks,
> Phoenix Sol
>
Fabio Mascarenhas