builtin: simplify the .si_c and .si_vp cases in StrIntpData.get_fmt_format, free intermediate results
parent
d2bc9ee7bc
commit
665c386771
|
@ -593,11 +593,15 @@ fn (data StrIntpData) get_fmt_format(mut sb strings.Builder) {
|
||||||
}
|
}
|
||||||
// runes
|
// runes
|
||||||
.si_c {
|
.si_c {
|
||||||
sb.write_string(utf32_to_str(data.d.d_c))
|
ss := utf32_to_str(data.d.d_c)
|
||||||
|
sb.write_string(ss)
|
||||||
|
ss.free()
|
||||||
}
|
}
|
||||||
// v pointers
|
// v pointers
|
||||||
.si_vp {
|
.si_vp {
|
||||||
sb.write_string(u64(data.d.d_vp).hex())
|
ss := u64(data.d.d_vp).hex()
|
||||||
|
sb.write_string(ss)
|
||||||
|
ss.free()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sb.write_string('***ERROR!***')
|
sb.write_string('***ERROR!***')
|
||||||
|
|
Loading…
Reference in New Issue