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)
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


Trivial merge