all: fix broken docunits
[nit.git] / lib / c.nit
index c0bd650..6c843f3 100644 (file)
--- a/lib/c.nit
+++ b/lib/c.nit
@@ -16,6 +16,8 @@
 
 # Utilities and performant structure for the FFI with C
 module c
+import standard
+intrude import standard::collection::array
 
 # A thin wrapper around a `NativeCArray` adding length information
 abstract class CArray[E]
@@ -27,7 +29,6 @@ end
 # A native C array, as in a pointer to the first element of the array
 extern class NativeCArray `{ void * `}
        type E: nullable Object
-       type SELF: NativeCArray
 
        fun [](index: E): E is abstract
        fun []=(index: E, val: E) is abstract
@@ -77,7 +78,6 @@ end
 extern class NativeCIntArray `{ int* `}
        super NativeCArray
        redef type E: Int
-       redef type SELF: NativeCIntArray
 
        new(size: Int) `{ return calloc(size, sizeof(int)); `}
        redef fun [](index) `{ return recv[index]; `}
@@ -89,7 +89,6 @@ end
 redef class NativeString
        super NativeCArray
        redef type E: Char
-       redef type SELF: NativeString
 
        redef fun +(offset) `{ return recv + offset; `}
 end