diff options
author | Damien George <damien.p.george@gmail.com> | 2014-07-31 13:47:06 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-07-31 13:47:06 +0000 |
commit | 8cc2018d47bc15a1b10295965fc0ccd27c0dcbba (patch) | |
tree | 5e8ba4bed5de1f1973203b9cff2c8aab78b419fc /py/obj.h | |
parent | c9aa58e6381018cca2513e3468363af0b5442d1f (diff) | |
parent | bb4c6f35c627ab3487cdd6bafb4588cc633cd6a4 (diff) | |
download | micropython-8cc2018d47bc15a1b10295965fc0ccd27c0dcbba.tar.gz micropython-8cc2018d47bc15a1b10295965fc0ccd27c0dcbba.zip |
Merge branch 'master' of https://github.com/micropython/micropython
Diffstat (limited to 'py/obj.h')
-rw-r--r-- | py/obj.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -76,10 +76,10 @@ typedef struct _mp_obj_base_t mp_obj_base_t; #define MP_OBJ_IS_STR(o) (MP_OBJ_IS_QSTR(o) || MP_OBJ_IS_TYPE(o, &mp_type_str)) #define MP_OBJ_SMALL_INT_VALUE(o) (((mp_int_t)(o)) >> 1) -#define MP_OBJ_NEW_SMALL_INT(small_int) ((mp_obj_t)(((small_int) << 1) | 1)) +#define MP_OBJ_NEW_SMALL_INT(small_int) ((mp_obj_t)((((mp_int_t)(small_int)) << 1) | 1)) #define MP_OBJ_QSTR_VALUE(o) (((mp_int_t)(o)) >> 2) -#define MP_OBJ_NEW_QSTR(qstr) ((mp_obj_t)((((mp_uint_t)qstr) << 2) | 2)) +#define MP_OBJ_NEW_QSTR(qstr) ((mp_obj_t)((((mp_uint_t)(qstr)) << 2) | 2)) // These macros are used to declare and define constant function objects // You can put "static" in front of the definitions to make them local @@ -460,6 +460,7 @@ void mp_init_emergency_exception_buf(void); // str mp_obj_t mp_obj_str_builder_start(const mp_obj_type_t *type, uint len, byte **data); mp_obj_t mp_obj_str_builder_end(mp_obj_t o_in); +mp_obj_t mp_obj_str_builder_end_with_len(mp_obj_t o_in, mp_uint_t len); bool mp_obj_str_equal(mp_obj_t s1, mp_obj_t s2); uint mp_obj_str_get_hash(mp_obj_t self_in); uint mp_obj_str_get_len(mp_obj_t self_in); |