mirror of
https://github.com/vlang/v.git
synced 2025-09-13 06:22:26 +03:00
builtin: add a temporary ctovstring_impl/1 API to enable ui
to compile cleanly for PR#25264, part 1
This commit is contained in:
parent
847c15e5ac
commit
69e80ba96d
1 changed files with 13 additions and 0 deletions
|
@ -3052,3 +3052,16 @@ pub fn (mut ri RunesIterator) next() ?rune {
|
|||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue