diff options
| author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-06 18:18:46 +0300 |
|---|---|---|
| committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-06 18:19:27 +0300 |
| commit | ec7fe925312845f788590ce5ccb2a8b3a18a0486 (patch) | |
| tree | da3e6c377905cb07894d9372b9dfdfb2ab4d9ceb /py/objarray.c | |
| parent | 380561836d8d752d55765578506450d7121355b5 (diff) | |
py/objarray: Split out header to allow direct access to object.
This follows source code/header file organization similar to few other
objects, and intended to be used only is special cases, where efficiency/
simplicity matters.
Diffstat (limited to 'py/objarray.c')
| -rw-r--r-- | py/objarray.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/py/objarray.c b/py/objarray.c index bafba7623..2cd0fef6b 100644 --- a/py/objarray.c +++ b/py/objarray.c @@ -34,6 +34,7 @@ #include "py/runtime.h" #include "py/binary.h" #include "py/objstr.h" +#include "py/objarray.h" #if MICROPY_PY_ARRAY || MICROPY_PY_BUILTINS_BYTEARRAY || MICROPY_PY_BUILTINS_MEMORYVIEW @@ -58,16 +59,6 @@ #define TYPECODE_MASK (~(mp_uint_t)0) #endif -typedef struct _mp_obj_array_t { - mp_obj_base_t base; - mp_uint_t typecode : 8; - // free is number of unused elements after len used elements - // alloc size = len + free - mp_uint_t free : (8 * sizeof(mp_uint_t) - 8); - mp_uint_t len; // in elements - void *items; -} mp_obj_array_t; - STATIC mp_obj_t array_iterator_new(mp_obj_t array_in); STATIC mp_obj_t array_append(mp_obj_t self_in, mp_obj_t arg); STATIC mp_obj_t array_extend(mp_obj_t self_in, mp_obj_t arg_in); |
