diff options
author | Damien George <damien.p.george@gmail.com> | 2014-02-26 17:40:52 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-02-26 17:40:52 +0000 |
commit | 510477557d1cd13dc3cfdebf32338aa1b75180cb (patch) | |
tree | 3ea84ff43ecf5780cd357c1cd45bb3c51594d21f /py/obj.h | |
parent | 98fb8935bc54085989cb271eb1a75fe2a6214c43 (diff) | |
download | micropython-510477557d1cd13dc3cfdebf32338aa1b75180cb.tar.gz micropython-510477557d1cd13dc3cfdebf32338aa1b75180cb.zip |
py: Take out bitfield entries from their own structure.
Don't need to wrap bitfields in their own struct. Compiler does the
correct thing without it.
Diffstat (limited to 'py/obj.h')
-rw-r--r-- | py/obj.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -54,7 +54,7 @@ typedef struct _mp_obj_base_t mp_obj_base_t; #define MP_DECLARE_CONST_FUN_OBJ(obj_name) extern const mp_obj_fun_native_t obj_name -#define MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, is_kw, n_args_min, n_args_max, fun_name) const mp_obj_fun_native_t obj_name = {{&fun_native_type}, {is_kw, n_args_min}, n_args_max, (void *)fun_name} +#define MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, is_kw, n_args_min, n_args_max, fun_name) const mp_obj_fun_native_t obj_name = {{&fun_native_type}, is_kw, n_args_min, n_args_max, (void *)fun_name} #define MP_DEFINE_CONST_FUN_OBJ_0(obj_name, fun_name) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, false, 0, 0, (mp_fun_0_t)fun_name) #define MP_DEFINE_CONST_FUN_OBJ_1(obj_name, fun_name) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, false, 1, 1, (mp_fun_1_t)fun_name) #define MP_DEFINE_CONST_FUN_OBJ_2(obj_name, fun_name) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, false, 2, 2, (mp_fun_2_t)fun_name) @@ -374,10 +374,8 @@ mp_obj_t mp_obj_new_bytearray_by_ref(uint n, void *items); // functions typedef struct _mp_obj_fun_native_t { // need this so we can define const objects (to go in ROM) mp_obj_base_t base; - struct { - bool is_kw : 1; - machine_uint_t n_args_min : (8 * sizeof(machine_uint_t) - 1); // inclusive - }; + bool is_kw : 1; + machine_uint_t n_args_min : (8 * sizeof(machine_uint_t) - 1); // inclusive machine_uint_t n_args_max; // inclusive void *fun; // TODO add mp_map_t *globals |