justincormack/ljsyscall

S.read : when passing in a buffer and size, it returns the length of the buffer rather than a string version of the buffer.

DorianGray opened this issue · 2 comments

Not passing in the buffer and size causes it to work normally.

Yes. The interface inconsistency is not nice, but interning to a Lua string is a fairly expensive operation, so I wanted to avoid doing it if you don't need it. I am not sure the current setup is the best solution though. The assumption is if you pass a buffer you know what you are doing...

thanks for the clarification!