builtin: add a temporary ctovstring_impl/1 API to enable ui to compile cleanly for PR#25264, part 1

This commit is contained in:
Delyan Angelov 2025-09-09 15:00:05 +03:00
parent 847c15e5ac
commit 69e80ba96d
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED

View file

@ -3052,3 +3052,16 @@ pub fn (mut ri RunesIterator) next() ?rune {
} }
return rune(impl_utf8_to_utf32(start, len)) return rune(impl_utf8_to_utf32(start, len))
} }
// ctovstring_impl is a temporary API, to enable clean CI runs for https://github.com/vlang/v/pull/25264 .
// It will be deleted after the migration to the new `builtin` naming scheme is finished.
@[export: 'builtin__ctovstring']
pub fn ctovstring_impl(s &u8) string {
unsafe {
len := C.strlen(voidptr(s))
return string{
str: memdup(voidptr(s), isize(len))
len: len
}
}
}