lua-users home
lua-l archive

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


Thanks, Adam, This worked just fine and solved the problem.

24.12.2011, 02:31, "Adam Strzelecki" <ono@java.pl>:
>>  Is it any way to pass int to function, expecting *void?
>>  I cannot change type in declaration to int*, because sometimes I need to pass strings instead of integers.
>
> Hmm... the function expects int* (pointer to int), but you are trying to pass int by value, which probably renders segfault because 22 is not valid address. Try that:
> ssh.ssh_options_set(session, 1, ffi.new("int[1]", 22))
>
> Cheers,
>
> --
> Adam Strzelecki

-- 
Best regards,
Vladimir Protasov.