1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: disallow op= and infix on a voidptr (#7175)

This commit is contained in:
Nick Treleaven
2020-12-07 20:43:38 +00:00
committed by GitHub
parent ed9aa873c1
commit 63557d0d02
7 changed files with 68 additions and 10 deletions

View File

@ -46,7 +46,7 @@ pub fn (mut ctx Context) run() ? {
// TODO: remove
fn (mut ctx Context) shift(len int) {
unsafe {
C.memmove(ctx.read_buf.data, ctx.read_buf.data + len, ctx.read_buf.cap - len)
C.memmove(ctx.read_buf.data, byteptr(ctx.read_buf.data) + len, ctx.read_buf.cap - len)
ctx.resize_arr(ctx.read_buf.len - len)
}
}