1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Makefile: re-write make test in V

This commit is contained in:
Alexander Medvednikov
2019-08-16 15:05:11 +03:00
parent 5ea4b463bb
commit b188ecf680
7 changed files with 106 additions and 71 deletions

View File

@ -41,9 +41,7 @@ pub fn tos_clone(s byteptr) string {
if isnil(s) {
panic('tos: nil string')
}
len := strlen(s)
res := tos(s, len)
return res.clone()
return tos2(s).clone()
}
// Same as `tos`, but calculates the length. Called by `string(bytes)` casts.