diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-04 15:08:23 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-04 15:08:23 +0100 |
commit | e8208a7f0246e584b09455e82cc7f27cf7f0fe95 (patch) | |
tree | c1dd95f882e9f187172a4d2a3cfc3ee07020664e /py/objint.h | |
parent | d7aadcfe1b35a54ea873c3b052abbeeb268a7202 (diff) | |
download | micropython-e8208a7f0246e584b09455e82cc7f27cf7f0fe95.tar.gz micropython-e8208a7f0246e584b09455e82cc7f27cf7f0fe95.zip |
py: Make False and True act like 0 and 1 for integer arithmetic.
Diffstat (limited to 'py/objint.h')
-rw-r--r-- | py/objint.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/py/objint.h b/py/objint.h index 53ee49e7db..fe7f60a2d4 100644 --- a/py/objint.h +++ b/py/objint.h @@ -7,6 +7,7 @@ typedef struct _mp_obj_int_t { #endif } mp_obj_int_t; -void int_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind); -mp_obj_t int_unary_op(int op, mp_obj_t o_in); -mp_obj_t int_binary_op(int op, mp_obj_t lhs_in, mp_obj_t rhs_in); +void mp_obj_int_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind); +mp_obj_t mp_obj_int_unary_op(int op, mp_obj_t o_in); +mp_obj_t mp_obj_int_binary_op(int op, mp_obj_t lhs_in, mp_obj_t rhs_in); +mp_obj_t mp_obj_int_binary_op_extra_cases(int op, mp_obj_t lhs_in, mp_obj_t rhs_in); |