diff options
| author | Damien | 2013-12-21 18:17:45 +0000 |
|---|---|---|
| committer | Damien | 2013-12-21 18:17:45 +0000 |
| commit | d99b05282d14ceb0163cbcd059aa37bdb415af43 (patch) | |
| tree | 978135f9fe83d3c4d5b3c95f84cb104c0092936a /stm/lexerstm.h | |
| parent | e2880aa2fdc75298df487df7519d483acb03959c (diff) | |
Change object representation from 1 big union to individual structs.
A big change. Micro Python objects are allocated as individual structs
with the first element being a pointer to the type information (which
is itself an object). This scheme follows CPython. Much more flexible,
not necessarily slower, uses same heap memory, and can allocate objects
statically.
Also change name prefix, from py_ to mp_ (mp for Micro Python).
Diffstat (limited to 'stm/lexerstm.h')
| -rw-r--r-- | stm/lexerstm.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stm/lexerstm.h b/stm/lexerstm.h index f57d1faa9..7e090898a 100644 --- a/stm/lexerstm.h +++ b/stm/lexerstm.h @@ -3,14 +3,14 @@ typedef struct _py_lexer_str_buf_t { const char *src_beg; // beginning of source const char *src_cur; // current location in source const char *src_end; // end (exclusive) of source -} py_lexer_str_buf_t; +} mp_lexer_str_buf_t; typedef struct _py_lexer_file_buf_t { FIL fp; char buf[20]; uint16_t len; uint16_t pos; -} py_lexer_file_buf_t; +} mp_lexer_file_buf_t; -py_lexer_t *py_lexer_new_from_str_len(const char *src_name, const char *str, uint len, bool free_str, py_lexer_str_buf_t *sb); -py_lexer_t *py_lexer_new_from_file(const char *filename, py_lexer_file_buf_t *fb); +mp_lexer_t *mp_lexer_new_from_str_len(const char *src_name, const char *str, uint len, bool free_str, mp_lexer_str_buf_t *sb); +mp_lexer_t *mp_lexer_new_from_file(const char *filename, mp_lexer_file_buf_t *fb); |
