mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: require unsafe for Struct(voidptr) casts
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user