Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | all: Use the name MicroPython consistently in comments | Alexander Steffen | 2017-07-31 |
| | | | | | There were several different spellings of MicroPython present in comments, when there should be only one. | ||
* | py/binary: mp_binary_get_size: Raise error on unsupported typecodes. | Paul Sokolovsky | 2017-01-17 |
| | | | | | Previouly, we had errors checked in callers, which led to duplicate code or missing checks in some places. | ||
* | py/modstruct: Remove unreachable code, and add comment about CPy diff. | Damien George | 2016-10-07 |
| | | | | | The deleted code is unreachable because calcsize_items guarantees that num_items corresponds to how many items there are in fmt to unpack. | ||
* | all: Remove 'name' member from mp_obj_module_t struct. | Damien George | 2016-09-22 |
| | | | | One can instead lookup __name__ in the modules dict to get the value. | ||
* | py/modstruct: Use more compact mp_raise_ValueError function. | Damien George | 2016-08-26 |
| | | | | Saves a few bytes of code size. | ||
* | py/modstruct: Allow to have "0s" in struct format. | Damien George | 2016-05-28 |
| | |||
* | py/modstruct: Raise ValueError on unsupported format char. | Paul Sokolovsky | 2016-05-14 |
| | |||
* | py: Add ustruct.pack_into and unpack_from | Dave Hylands | 2016-01-19 |
| | |||
* | py: Change type signature of builtin funs that take variable or kw args. | Damien George | 2016-01-11 |
| | | | | | With this patch the n_args parameter is changed type from mp_uint_t to size_t. | ||
* | py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR. | Damien George | 2015-11-29 |
| | | | | | | | | | This allows the mp_obj_t type to be configured to something other than a pointer-sized primitive type. This patch also includes additional changes to allow the code to compile when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of mp_uint_t, and various casts. | ||
* | py: Add MP_ROM_* macros and mp_rom_* types and use them. | Damien George | 2015-11-29 |
| | |||
* | py/modstruct: Support repetition counters for all types, not just string. | Paul Sokolovsky | 2015-10-31 |
| | | | | | | | This makes format specifiers ~ fully compatible with CPython. Adds 24 bytes for stmhal port (because previosuly we had to catch and report it's unsupported to user). | ||
* | modstruct: Raise NotImplementedError for unsupported repeat specification. | Paul Sokolovsky | 2015-07-05 |
| | |||
* | modstruct: Rename module to "ustruct", to allow full Python-level impl. | Paul Sokolovsky | 2015-05-04 |
| | |||
* | py: Parse big-int/float/imag constants directly in parser. | Damien George | 2015-02-08 |
| | | | | | | | | | Previous to this patch, a big-int, float or imag constant was interned (made into a qstr) and then parsed at runtime to create an object each time it was needed. This is wasteful in RAM and not efficient. Now, these constants are parsed straight away in the parser and turned into objects. This allows constants with large numbers of digits (so addresses issue #1103) and takes us a step closer to #722. | ||
* | py: Remove mp_obj_str_builder and use vstr instead. | Damien George | 2015-01-21 |
| | | | | | | | | | | | | With this patch str/bytes construction is streamlined. Always use a vstr to build a str/bytes object. If the size is known beforehand then use vstr_init_len to allocate only required memory. Otherwise use vstr_init and the vstr will grow as needed. Then use mp_obj_new_str_from_vstr to create a str/bytes object using the vstr memory. Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes on unix x64. | ||
* | py: Move to guarded includes, everywhere in py/ core. | Damien George | 2015-01-01 |
| | | | | Addresses issue #1022. | ||
* | Use MP_DEFINE_CONST_DICT macro to define module dicts. | Damien George | 2014-11-29 |
| | | | | | This is just a clean-up of the code. Generated code is exactly the same. | ||
* | py: Make mp_binary_set_val work on big endian machine. | Damien George | 2014-10-06 |
| | |||
* | py: Convert [u]int to mp_[u]int_t where appropriate. | Damien George | 2014-10-03 |
| | | | | Addressing issue #50. | ||
* | py: Change uint to mp_uint_t in runtime.h, stackctrl.h, binary.h. | Damien George | 2014-08-30 |
| | | | | Part of code cleanup, working towards resolving issue #50. | ||
* | Rename machine_(u)int_t to mp_(u)int_t. | Damien George | 2014-07-03 |
| | | | | See discussion in issue #50. | ||
* | py: Include mpconfig.h before all other includes. | Paul Sokolovsky | 2014-06-21 |
| | | | | | | It defines types used by all other headers. Fixes #691. | ||
* | Prefix ARRAY_SIZE with micropython prefix MP_ | Emmanuel Blot | 2014-06-19 |
| | |||
* | modstruct: Add one more extension to typecodes - 'S', a pointer to C string. | Paul Sokolovsky | 2014-06-02 |
| | | | | Also, add comment with description of extension to CPython's typecodes. | ||
* | Rename configuration variables controling Python features. | Damien George | 2014-05-24 |
| | | | | Now of the form MICROPY_PY_*. See issue #35. | ||
* | modstruct: struct_calcsize: Fix case of uninitialized var. | Paul Sokolovsky | 2014-05-20 |
| | |||
* | py, unix: Add copyright for modules I worked closely on. | Paul Sokolovsky | 2014-05-13 |
| | |||
* | modstruct: Implement count specifier for strings (e.g. "100s"). | Paul Sokolovsky | 2014-05-12 |
| | | | | Infra for counts of other types is there, need last mile to be implemented. | ||
* | modstruct: Use MP_OBJ_FUN_ARGS_MAX instead of -1.v1.0.1 | Paul Sokolovsky | 2014-05-11 |
| | |||
* | Add license header to (almost) all files. | Damien George | 2014-05-03 |
| | | | | | | | Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/. | ||
* | Add ARRAY_SIZE macro, and use it where possible. | Damien George | 2014-04-26 |
| | |||
* | modstruct: Initial implementation of struct.pack(). | Paul Sokolovsky | 2014-04-19 |
| | |||
* | modstruct: Fix .calcsize() to account for struct type/alignment. | Paul Sokolovsky | 2014-04-19 |
| | |||
* | py: Allow to pass buffer protocol flags to get_buffer helper funcs. | Damien George | 2014-04-18 |
| | |||
* | py: Add typecode to buffer protocol. | Damien George | 2014-04-18 |
| | | | | | | | When querying an object that supports the buffer protocol, that object must now return a typecode (as per binary.[ch]). This does not have to be honoured by the caller, but can be useful for determining element size. | ||
* | modstruct: Basic implementation of native struct alignment and types. | Paul Sokolovsky | 2014-04-11 |
| | |||
* | modstruct: Refactor to support both LE and BE packed structs. | Paul Sokolovsky | 2014-04-11 |
| | |||
* | py: Fix modstruct to compile on 64-bit machine. | Damien George | 2014-04-10 |
| | |||
* | py: Start implementing "struct" module. | Paul Sokolovsky | 2014-04-10 |
Only calcsize() and unpack() functions provided so far, for little-endian byte order. Format strings don't support repition spec (like "2b3i"). Unfortunately, dealing with all the various binary type sizes and alignments will lead to quite a bloated "binary" helper functions - if optimizing for speed. Need to think if using dynamic parametrized algos makes more sense. |