Merge: core/stream: change read_byte return type to Int
authorJean Privat <jean@pryen.org>
Fri, 27 Apr 2018 16:19:33 +0000 (12:19 -0400)
committerJean Privat <jean@pryen.org>
Fri, 27 Apr 2018 16:19:33 +0000 (12:19 -0400)
commit63ade15798b72a9e25fe9529c3ce528434314ac2
tree13d0288a71b9afa1cb7db116b1a32bee5ae8b90b
parentdebe0682b7cb5e134925547ef7080869c35d7a17
parent82a8da591376a6ed663493ce5d5a84d39b184072
Merge: core/stream: change read_byte return type to Int

A read_byte used to return a nullable Byte, which could cause
unnecessary boxings, and thus could harm performance.

This commit changes its return to Int, and adopts a closer-to-C api,
returning a negative value when an error occurs.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

Pull-Request: #2631