mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 16:32:11 +01:00
Introduce "array[N] T" and "slice T" type syntax
This commit is contained in:
1 parent
2b91e7861c
commit
d33db6dae0
15 files changed
+83
-68
No files matched your search
@@ -13,6 +13,7 @@
|
||||
- Let the `std/zlib` decoder ignore checksums.
|
||||
- Renamed `std/flate` to `std/deflate`.
|
||||
- Renamed `buf1`, `reader1`, etc to `io_buffer`, `io_reader`, etc.
|
||||
- Renamed `[N] T` and `[] T` types to `array[N] T` and `slice T`.
|
||||
- Supported animated (not just single frame) GIFs.
|
||||
- Marked the `std/gif` LZW decoder as private.
|
||||
- Marked some internal status codes as private.
|
||||
|
||||
@@ -78,9 +78,9 @@ Converting an expression `x` to the type `T` is written as `x as T`.
|
||||
|
||||
## Types
|
||||
|
||||
Types read from left to right: `ptr [100] u32` is a pointer to a 100-element
|
||||
array of unsigned 32-bit integers. `ptr` here means a non-null pointer. Use
|
||||
`nptr` for a nullable pointer type.
|
||||
Types read from left to right: `ptr array [100] u32` is a pointer to a
|
||||
100-element array of unsigned 32-bit integers. `ptr` here means a non-null
|
||||
pointer. Use `nptr` for a nullable pointer type.
|
||||
|
||||
Integer types can also be refined: `var x u32[10..20]` defines a variable x
|
||||
that is stored as 4 bytes (32 bits) and can be combined arithmetically (e.g.
|
||||
|
||||
Reference in new issue
Block a user