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 { pub fn (s string) u32() u32 {
$if tinyc { //$if tinyc {
return u32(s.int()) // TODO //return u32(s.int()) // TODO
} $else { //} $else {
return C.strtoul(*char(s.str), 0, 0) return C.strtoul(*char(s.str), 0, 0)
} //}
} }
pub fn (s string) u64() u64 { pub fn (s string) u64() u64 {
$if tinyc { //$if tinyc {
return u64(s.i64()) // TODO //return u64(s.i64()) // TODO
} $else { //} $else {
return C.strtoull(*char(s.str), 0, 0) return C.strtoull(*char(s.str), 0, 0)
} //}
//return C.atoll(s.str) // temporary fix for tcc on windows. //return C.atoll(s.str) // temporary fix for tcc on windows.
} }