mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
checker: require unsafe for Struct(voidptr) casts
This commit is contained in:
parent
0146509516
commit
868908b80d
25 changed files with 64 additions and 83 deletions
|
@ -656,9 +656,8 @@ pub:
|
|||
|
||||
// interpolation function
|
||||
[direct_array_access; manualfree]
|
||||
pub fn str_intp(data_len int, in_data voidptr) string {
|
||||
pub fn str_intp(data_len int, input_base &StrIntpData) string {
|
||||
mut res := strings.new_builder(256)
|
||||
input_base := &StrIntpData(in_data)
|
||||
for i := 0; i < data_len; i++ {
|
||||
data := unsafe { &input_base[i] }
|
||||
// avoid empty strings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue