Skip to content

Commit 69e80ba

Browse files
committed
builtin: add a temporary ctovstring_impl/1 API to enable ui to compile cleanly for PR#25264, part 1
1 parent 847c15e commit 69e80ba

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎vlib/builtin/string.v‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3052,3 +3052,16 @@ pub fn (mut ri RunesIterator) next() ?rune {
30523052
}
30533053
return rune(impl_utf8_to_utf32(start, len))
30543054
}
3055+
3056+
// ctovstring_impl is a temporary API, to enable clean CI runs for https://github.com/vlang/v/pull/25264 .
3057+
// It will be deleted after the migration to the new `builtin` naming scheme is finished.
3058+
@[export: 'builtin__ctovstring']
3059+
pub fn ctovstring_impl(s &u8) string {
3060+
unsafe {
3061+
len := C.strlen(voidptr(s))
3062+
return string{
3063+
str: memdup(voidptr(s), isize(len))
3064+
len: len
3065+
}
3066+
}
3067+
}

0 commit comments

Comments
 (0)