c_src: update to have intern args
[nit.git] / c_src / stream_nit.h
1 #ifndef __STREAM_NIT_H
2 #define __STREAM_NIT_H
3 /* This file is part of NIT ( http://www.nitlanguage.org ).
4 *
5 * Copyright 2004-2008 Jean Privat <jean@pryen.org>
6 *
7 * This file is free software, which comes along with NIT. This software is
8 * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 * PARTICULAR PURPOSE. You can modify it is you want, provided this header
11 * is kept unaltered, and a notification of the changes is added.
12 * You are allowed to redistribute it and sell it, alone or is a part of
13 * another product.
14 */
15
16 #include <unistd.h>
17
18 int stream_FDStream_FDStream_native_read_char_1(void *s, int fd);
19
20 #ifndef NONITCNI
21 #include <stream._nitni.h>
22 nullable_Int Object_intern_poll___impl( Object recv, Array in_fds, Array out_fds );
23 #endif
24
25 #define stream_FDStream_FDStream_native_close_1(self, p0) (close(p0))
26 #define stream_FDStream_FDStream_native_read_3(s, i, b, l) read((i), ((b)), ((l)))
27 #define stream_FDStream_FDStream_native_write_3(s, i, b, l) write((i), ((b)), ((l)))
28 #define stream_FDStream_FDStream_native_write_char_2(s, i, c) write((i), (char[]){(c)}, 1 )
29
30 #endif