1
0
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:
Nick Treleaven
2020-12-09 18:58:02 +00:00
committed by GitHub
parent 92a8db5b2b
commit cf755d40b7
3 changed files with 6 additions and 4 deletions

View File

@ -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