nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
projects: update some short descriptions
[nit.git]
/
lib
/
c.nit
diff --git
a/lib/c.nit
b/lib/c.nit
index
a8e0c2f
..
04f7b20
100644
(file)
--- a/
lib/c.nit
+++ b/
lib/c.nit
@@
-119,7
+119,7
@@
end
# Wrapper around an array of `unsigned char` in C (`unsigned char*`) with length and destroy state
class CByteArray
# Wrapper around an array of `unsigned char` in C (`unsigned char*`) with length and destroy state
class CByteArray
- super CArray[Int]
+ super CArray[Byte]
redef type NATIVE: NativeCByteArray
# Allocate a new array of `size`
redef type NATIVE: NativeCByteArray
# Allocate a new array of `size`
@@
-128,8
+128,8
@@
class CByteArray
super size
end
super size
end
- # Build from an `Array[Int]`
- new from(array: Array[Int])
+ # Build from a `SequenceRead[Byte]`
+ new from(array: SequenceRead[Byte])
do
var carray = new CByteArray(array.length)
for i in array.length.times do
do
var carray = new CByteArray(array.length)
for i in array.length.times do
@@
-142,7
+142,7
@@
end
# An array of `unsigned char` in C (`unsigned char*`)
extern class NativeCByteArray `{ unsigned char* `}
super NativeCArray
# An array of `unsigned char` in C (`unsigned char*`)
extern class NativeCByteArray `{ unsigned char* `}
super NativeCArray
- redef type E: Int
+ redef type E: Byte
# Allocate a new array of `size`
new(size: Int) `{ return calloc(size, sizeof(unsigned char)); `}
# Allocate a new array of `size`
new(size: Int) `{ return calloc(size, sizeof(unsigned char)); `}