X-Git-Url: http://nitlanguage.org diff --git a/c_src/stream_nit.c b/c_src/stream_nit.c index de0c031..14bfece 100644 --- a/c_src/stream_nit.c +++ b/c_src/stream_nit.c @@ -13,18 +13,13 @@ #include "stream_nit.h" -int stream_FDStream_FDStream_native_read_char_1(FDStream s, int fd) { +int stream_FDStream_FDStream_native_read_char_1(void *s, int fd) { int result; char buf; ssize_t r = read(fd, &buf, 1); - if (r == 0) + if (r == 0) result = -1; - else + else result = buf; return result; } - -void stream_FDStream_FDStream_write_char_1(FDStream s, int fd, int c) { - write(fd, &c, 1); -} -