| Commit message (Collapse) | Author | Age |
|
|
|
| |
Part of code cleanup, towards resolving issue #50.
|
|
|
|
| |
See discussion in issue #50.
|
|
|
|
|
|
| |
It defines types used by all other headers.
Fixes #691.
|
|
|
|
|
|
|
| |
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/.
|
|
|
|
|
|
|
| |
Had choice of either interning or forcing full equality comparison, and
chose latter. See comments in mp_map_lookup.
Addresses issue #523.
|
| |
|
|
|
|
| |
Seems that this fixes all set tests.
|
|
|
|
|
|
|
|
|
|
| |
Two things: 1) set flags in copy properly; make mp_map_init() not be too
smart and do something with requested alloc size. Policy of using prime
numbers for alloc size is high-level policy which should be applied at
corresponding high levels. Low-level functions should just do what they're
asked to, because they don't have enough context to be smarter than that.
For example, munging with alloc size of course breaks dict copying (as
changing sizes requires rehashing).
|
| |
|
|
|
|
|
|
| |
Towards addressing issue #424.
Had a small increase to ROM usage (order 60 bytes).
|
|
|
|
|
|
| |
Hash table can now be completely full (ie now NULL entry) before a
resize is triggered. Use sentinel value to indicate delete entry in the
table.
|
|
|
|
|
|
|
|
|
|
| |
When searching next time, such entry should be just skipped, not terminate
the search. It's known that marking techique is not efficient at the presense
of many removes, but namespace usage should not require many deletes, and
as for user dictionaries - well, open addressing map table with linear
rehashing and load factor of ~1 is not particularly efficient at all ;-).
TODO: May consider "shift other entries in cluster" approach as an
alternative.
|
| |
|
|
|
|
|
|
| |
Pretty much everyone needs to include map.h, since it's such an integral
part of the Micro Python object implementation. Thus, the definitions
are now in obj.h instead. map.h is removed.
|
|
|
|
| |
Remove unnecessary includes. Add includes that improve portability.
|
| |
|
|
|
|
| |
This allows keyword maps to be created directly from stack data.
|
|
|
|
| |
mp_map_deinit() finalizes static map, mp_map_free() - dynamic.
|
|
|
|
|
| |
Can now have null bytes in strings. Can define ROM qstrs per port using
qstrdefsport.h
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Added 0 to the list of primes. Funky primes, these.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|