string: bring back strtoul for now

pull/2349/head^2
Alexander Medvednikov 2019-10-15 08:50:50 +03:00
parent f9593bd857
commit 75e2a29cb5
1 changed files with 8 additions and 8 deletions

View File

@ -197,19 +197,19 @@ pub fn (s string) f64() f64 {
}
pub fn (s string) u32() u32 {
$if tinyc {
return u32(s.int()) // TODO
} $else {
//$if tinyc {
//return u32(s.int()) // TODO
//} $else {
return C.strtoul(*char(s.str), 0, 0)
}
//}
}
pub fn (s string) u64() u64 {
$if tinyc {
return u64(s.i64()) // TODO
} $else {
//$if tinyc {
//return u64(s.i64()) // TODO
//} $else {
return C.strtoull(*char(s.str), 0, 0)
}
//}
//return C.atoll(s.str) // temporary fix for tcc on windows.
}