1
0
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:
Nick Treleaven
2020-07-01 13:50:17 +01:00
committed by GitHub
parent 5eb76606ae
commit e7339fec15
6 changed files with 68 additions and 33 deletions

View File

@ -1,12 +1,6 @@
module picohttpparser
[inline]
fn cpy_str(dst byteptr, src string) int {
C.memcpy(dst, src.str, src.len)
return src.len
}
[inline]
[inline] [unsafe_fn]
fn cpy(dst, src byteptr, len int) int {
C.memcpy(dst, src, len)
return len