lua-users home
lua-l archive

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


> 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