mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: warn if C.m* or C.s* functions are called outside unsafe blocks (#5869)
This commit is contained in:
@@ -73,7 +73,9 @@ fn opt_ok(data voidptr, size int) Option {
|
||||
res := Option{
|
||||
ok: true
|
||||
}
|
||||
C.memcpy(res.data, data, size)
|
||||
unsafe {
|
||||
C.memcpy(res.data, data, size)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user