lua-users home
lua-l archive

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


> But I get nothing in c. Its just simple binary data from a file read with
> "rb" from lua.

The library function io.read effectively returns a string. So you were
right to try lua_checklstring.
So now, the error message was probably because the data was not the
first argument to the function.
Did you use something like object:method(binary_data) ? In that case
(with a colon in the call), the first argument will be `object` and
the second is `binary_data`.