mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: allow ++, -- on byteptr, charptr (#7218)
This commit is contained in:
@ -2668,7 +2668,7 @@ Examples of potentially memory-unsafe operations are:
|
||||
|
||||
To mark potentially memory-unsafe operations, enclose them in an `unsafe` block:
|
||||
|
||||
```v failcompile
|
||||
```v wip
|
||||
// allocate 2 uninitialized bytes & return a reference to them
|
||||
mut p := unsafe { malloc(2) }
|
||||
p[0] = `h` // Error: pointer indexing is only allowed in `unsafe` blocks
|
||||
|
Reference in New Issue
Block a user