Wykres commitów

4 Commity (6f5eb84c1959b7929824a881a0438d0eee23d31a)

Autor SHA1 Wiadomość Data
Damien George c14a81662c py: Add module weak link support.
With this patch a port can enable module weak link support and provide
a dict of qstr->module mapping.  This mapping is looked up only if an
import fails to find the requested module in the filesystem.

This allows to have the builtin module named, eg, usocket, and provide
a weak link of "socket" to the same module, but this weak link can be
overridden if a file by the name "socket.py" is found in the import
path.
2014-10-12 20:18:40 +01:00
Damien George 04b9147e15 Add license header to (almost) all files.
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/.
2014-05-03 23:27:38 +01:00
Damien George 7efc5b3f34 py: Make globals and locals proper dictionary objects.
Finishes addressing issue #424.

In the end this was a very neat refactor that now makes things a lot
more consistent across the py code base.  It allowed some
simplifications in certain places, now that everything is a dict object.

Also converted builtins tables to dictionaries.  This will be useful
when we need to turn builtins into a proper module.
2014-04-05 22:36:42 +01:00
Damien George caac542b23 Proper support for registering builtin modules in ROM.
Comes with some refactoring of code and renaming of files.  All modules
are now named mod*.[ch].
2014-03-25 14:18:18 +00:00