1. 11 Oct, 2015 1 commit
  2. 16 Apr, 2015 2 commits
    • Damien George's avatar
      044c473d
    • Damien George's avatar
      py: Overhaul and simplify printf/pfenv mechanism. · 7f9d1d6a
      Damien George authored
      Previous to this patch the printing mechanism was a bit of a tangled
      mess.  This patch attempts to consolidate printing into one interface.
      
      All (non-debug) printing now uses the mp_print* family of functions,
      mainly mp_printf.  All these functions take an mp_print_t structure as
      their first argument, and this structure defines the printing backend
      through the "print_strn" function of said structure.
      
      Printing from the uPy core can reach the platform-defined print code via
      two paths: either through mp_sys_stdout_obj (defined pert port) in
      conjunction with mp_stream_write; or through the mp_plat_print structure
      which uses the MP_PLAT_PRINT_STRN macro to define how string are printed
      on the platform.  The former is only used when MICROPY_PY_IO is defined.
      
      With this new scheme printing is generally more efficient (less layers
      to go through, less arguments to pass), and, given an mp_print_t*
      structure, one can call mp_print_str for efficiency instead of
      mp_printf("%s", ...).  Code size is also reduced by around 200 bytes on
      Thumb2 archs.
      7f9d1d6a
  3. 26 Mar, 2015 1 commit
  4. 20 Mar, 2015 1 commit
    • Paul Sokolovsky's avatar
      py: Implement core of OrderedDict type. · 0ef01d0a
      Paul Sokolovsky authored
      Given that there's already support for "fixed table" maps, which are
      essentially ordered maps, the implementation of OrderedDict just extends
      "fixed table" maps by adding an "is ordered" flag and add/remove
      operations, and reuses 95% of objdict code, just making methods tolerant
      to both dict and OrderedDict.
      
      Some things are missing so far, like CPython-compatible repr and comparison.
      
      OrderedDict is Disabled by default; enabled on unix and stmhal ports.
      0ef01d0a
  5. 20 Jan, 2015 1 commit
  6. 14 Jan, 2015 1 commit
  7. 01 Jan, 2015 1 commit
  8. 10 Dec, 2014 1 commit
  9. 17 Sep, 2014 2 commits
  10. 30 Aug, 2014 1 commit
  11. 29 Aug, 2014 1 commit
  12. 31 Jul, 2014 1 commit
  13. 03 Jul, 2014 1 commit
  14. 05 Jun, 2014 1 commit
  15. 03 Jun, 2014 1 commit
    • Damien George's avatar
      py: Implement full behaviour of dict.update(), and dict(). · bcb6ca4d
      Damien George authored
      Add keyword args to dict.update(), and ability to take a dictionary as
      argument.
      
      dict() class constructor can now use dict.update() directly.
      
      This patch loses fast path for dict(other_dict), but is that really
      needed?  Any anyway, this idiom will now re-hash the dictionary, so is
      arguably more memory efficient.
      
      Addresses issue #647.
      bcb6ca4d
  16. 21 May, 2014 1 commit
  17. 10 May, 2014 1 commit
  18. 03 May, 2014 1 commit
    • Damien George's avatar
      Add license header to (almost) all files. · 04b9147e
      Damien George authored
      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/.
      04b9147e
  19. 02 May, 2014 1 commit
  20. 17 Apr, 2014 2 commits
  21. 13 Apr, 2014 3 commits
  22. 11 Apr, 2014 4 commits
  23. 08 Apr, 2014 1 commit
  24. 06 Apr, 2014 3 commits
  25. 05 Apr, 2014 5 commits
  26. 04 Apr, 2014 1 commit