lua-users home
lua-l archive

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


No what I wrote in the last post is all there is in the function.

It does work, just as long as I only send a normal string like "abcd1234" etc.

On 8/15/2012 12:07 AM, Patrick Rapin wrote:
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`.