mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
json2: wrap Builder.free() calls inside unsafe (#8790)
This commit is contained in:
parent
2002d20249
commit
e4a67dea37
@ -311,7 +311,7 @@ fn (mut p Parser) decode_string() ?Any {
|
||||
}
|
||||
p.next()
|
||||
defer {
|
||||
strwr.free()
|
||||
unsafe { strwr.free() }
|
||||
}
|
||||
str := strwr.str()
|
||||
return Any(str)
|
||||
|
@ -30,7 +30,7 @@ pub fn (flds map[string]Any) str() string {
|
||||
}
|
||||
wr.write_b(`}`)
|
||||
defer {
|
||||
wr.free()
|
||||
unsafe { wr.free() }
|
||||
}
|
||||
res := wr.str()
|
||||
return res
|
||||
@ -45,7 +45,7 @@ pub fn (flds []Any) str() string {
|
||||
}
|
||||
wr.write_b(`]`)
|
||||
defer {
|
||||
wr.free()
|
||||
unsafe { wr.free() }
|
||||
}
|
||||
res := wr.str()
|
||||
return res
|
||||
|
Loading…
Reference in New Issue
Block a user