X-Git-Url: http://nitlanguage.org diff --git a/c_src/stream._nitni.h b/c_src/stream._nitni.h index 7ef9316..82c4e4f 100644 --- a/c_src/stream._nitni.h +++ b/c_src/stream._nitni.h @@ -1,28 +1,43 @@ -#include -#include "standard___stream._sep.h" -#ifndef STREAM_NITNI_H -#define STREAM_NITNI_H +/* + Extern implementation of Nit module stream +*/ +#ifndef STREAM_NITG_NITNI_H +#define STREAM_NITG_NITNI_H -#ifndef FDSTREAM_TYPE -#define FDSTREAM_TYPE -struct s_FDStream{ - struct nitni_ref ref; /* real ref struct, must be first */ -}; -typedef struct s_FDStream *FDStream; -#define FDStream_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) ) -#define FDStream_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) ) +#ifndef NIT_TYPE_Object +#define NIT_TYPE_Object 1 +typedef struct nitni_instance *Object; #endif -#include "stream_nit.h" - -/* out/indirect function for stream::FDStream::native_close */ -val_t FDStream_native_close___out( val_t recv, val_t i ); - -/* out/indirect function for stream::FDStream::native_read_char */ -val_t FDStream_native_read_char___out( val_t recv, val_t i ); - -/* out/indirect function for stream::FDStream::native_read */ -val_t FDStream_native_read___out( val_t recv, val_t i, val_t buf, val_t len ); - -/* out/indirect function for stream::FDStream::native_write */ -val_t FDStream_native_write___out( val_t recv, val_t i, val_t buf, val_t len ); +#ifndef NIT_TYPE_nullable_Int +#define NIT_TYPE_nullable_Int 1 +typedef struct nitni_instance *nullable_Int; +#endif +#ifndef NIT_TYPE_Array_of_Int +#define NIT_TYPE_Array_of_Int 1 +typedef struct nitni_instance *Array_of_Int; +#endif +#ifndef NIT_TYPE_nullable_Object +#define NIT_TYPE_nullable_Object 1 +typedef struct nitni_instance *nullable_Object; +#endif +#include "stream._ffi.h" +#define Object_incr_ref(from) while(0){} +#define Object_decr_ref(from) while(0){} +#define nullable_Int_incr_ref(from) while(0){} +#define nullable_Int_decr_ref(from) while(0){} +extern nullable_Int stream___null_Int(); +#define null_Int stream___null_Int +#define Array_of_Int_incr_ref(from) while(0){} +#define Array_of_Int_decr_ref(from) while(0){} +#define nullable_Object_incr_ref(from) while(0){} +#define nullable_Object_decr_ref(from) while(0){} +extern nullable_Object stream___null_Object(); +#define null_Object stream___null_Object +extern int stream___Array_of_Int_length( struct nitni_instance * recv ); +extern int stream___Array_of_Int__index( struct nitni_instance * recv, int index ); +extern int stream___Int_is_a_nullable_Int(int); +#define Int_is_a_nullable_Int stream___Int_is_a_nullable_Int +extern struct nitni_instance * stream___Int_as_nullable_Int(int); +#define Int_as_nullable_Int stream___Int_as_nullable_Int +#define Int_as_nullable Int_as_nullable_Int #endif