summaryrefslogtreecommitdiffstatshomepage
path: root/py/objint_mpz.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-07 18:30:52 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-07 18:30:52 +0100
commita32c1e41cc28c5f7cd95191918cebd0e447a2fce (patch)
treecc6a7b0c47d4ad2e96c8142a73a6eaaf77f6fa34 /py/objint_mpz.c
parent36db6bcf54fd32a247c85719832a9cf43e124ab5 (diff)
downloadmicropython-a32c1e41cc28c5f7cd95191918cebd0e447a2fce.tar.gz
micropython-a32c1e41cc28c5f7cd95191918cebd0e447a2fce.zip
py: Improve native emitter; now supports more opcodes.
Diffstat (limited to 'py/objint_mpz.c')
-rw-r--r--py/objint_mpz.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/py/objint_mpz.c b/py/objint_mpz.c
index d44ff7a07d..a7fcac9f28 100644
--- a/py/objint_mpz.c
+++ b/py/objint_mpz.c
@@ -260,9 +260,10 @@ mp_obj_t mp_obj_new_int_from_uint(machine_uint_t value) {
return mp_obj_new_int_from_ll(value);
}
-mp_obj_t mp_obj_new_int_from_long_str(const char *str) {
+mp_obj_t mp_obj_new_int_from_qstr(qstr qst) {
mp_obj_int_t *o = mp_obj_int_new_mpz();
- uint len = strlen(str);
+ uint len;
+ const char* str = (const char*)qstr_data(qst, &len);
int base = 0;
int skip = mp_parse_num_base(str, len, &base);
str += skip;