# See the License for the specific language governing permissions and
# limitations under the License.
-# Utilities and performant structure for the FFI with C
+# Structures and services for compatibility with the C language
module c
-import standard
-intrude import standard::collection::array
+
+import core
+intrude import core::collection::array
# A thin wrapper around a `NativeCArray` adding length information
abstract class CArray[E]
super size
end
- # Build from an `Array[Int]`
- new from(array: Array[Int])
+ # Create from an `SequenceRead[Int]`
+ new from(array: SequenceRead[Int])
do
var carray = new CIntArray(array.length)
for i in array.length.times do
super size
end
- # Build from a `SequenceRead[Byte]`
+ # Create from a `SequenceRead[Byte]`
new from(array: SequenceRead[Byte])
do
var carray = new CByteArray(array.length)
super size
end
- # Build from an `Array[NativeString]`
- new from(array: Array[NativeString])
+ # Create from an `SequenceRead[NativeString]`
+ new from(array: SequenceRead[NativeString])
do
var carray = new CNativeStringArray(array.length)
for i in array.length.times do