mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 19:50:30 +01:00
@@ -29,6 +29,7 @@
|
||||
// find real radix base, and strip preceding '0x', '0o' and '0b'
|
||||
// puts base in *base, and returns number of bytes to skip the prefix
|
||||
mp_uint_t mp_parse_num_base(const char *str, mp_uint_t len, mp_uint_t *base) {
|
||||
(void)len; // TODO use given len?
|
||||
const byte *p = (const byte*)str;
|
||||
unichar c = *(p++);
|
||||
if ((*base == 0 || *base == 16) && c == '0') {
|
||||
|
||||
Reference in New Issue
Block a user