mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: disallow pointer arithmetic for AssignStmt, PostfixExpr outside unsafe{} (#5581)
This commit is contained in:
@ -137,7 +137,9 @@ pub fn malloc(n int) byteptr {
|
||||
}
|
||||
$if prealloc {
|
||||
res := g_m2_ptr
|
||||
g_m2_ptr += n
|
||||
unsafe {
|
||||
g_m2_ptr += n
|
||||
}
|
||||
nr_mallocs++
|
||||
return res
|
||||
} $else {
|
||||
|
Reference in New Issue
Block a user