Damien George
ff8dd3f486
py, unix: Allow to compile with -Wunused-parameter.
...
See issue #699 .
2015-01-20 12:47:20 +00:00
Damien George
abc1959e2c
py, unix, lib: Allow to compile with -Wold-style-definition.
2015-01-12 22:34:38 +00:00
Damien George
3765ea419a
extmod: Prefix py/ for includes from py core directory.
2015-01-01 20:35:21 +00:00
Damien George
969a6b37bf
py: Make functions static where appropriate.
2014-12-10 22:08:14 +00:00
Damien George
be6d8be91e
py: Rename mp_obj_int_get to mp_obj_int_get_truncated; fix struct.pack.
...
mp_obj_int_get_truncated is used as a "fast path" int accessor that
doesn't check for overflow and returns the int truncated to the machine
word size, ie mp_int_t.
Use mp_obj_int_get_truncated to fix struct.pack when packing maximum word
sized values.
Addresses issues #779 and #998 .
2014-12-05 23:13:52 +00:00
Damien George
3b603f29ec
Use MP_DEFINE_CONST_DICT macro to define module dicts.
...
This is just a clean-up of the code. Generated code is exactly the
same.
2014-11-29 14:39:27 +00:00
Paul Sokolovsky
bfdc205934
modubinascii: Add, with hexlify() implementation.
2014-11-29 13:52:47 +00:00
Paul Sokolovsky
a944183b35
moduhashlib: Integrate sha256 implementation.
2014-11-22 14:48:17 +02:00
Paul Sokolovsky
63e02e8cc0
moduhashlib: Add sha256 implementation from "crypto-algorithms" project.
...
https://github.com/B-Con/crypto-algorithms revision 100f4ff
2014-11-22 14:47:52 +02:00
Paul Sokolovsky
f4b19c873f
moduhashlib: Initial module skeleton.
2014-11-22 14:47:46 +02:00
stijn
b89eaaa2e2
windows: Update config with latest features
...
- update mpconfigport.h to reflect latest unix version
- fix compilation error in modure due to msvc not allowing dynamic arrays
2014-11-21 19:38:33 +00:00
Paul Sokolovsky
8bb71f0b06
moductypes: Make .sizeof() work with bytearrays.
2014-10-30 03:50:37 +02:00
Paul Sokolovsky
6d287a6a02
moductypes: When dereferencing a field which is array of uint8, use bytearray.
...
Because bytearrays are much friendlier to work with, e.g. they can be printed
easily.
2014-10-30 03:50:34 +02:00
Paul Sokolovsky
2559e13957
moductypes: Make sure we can apply .sizeof() to all aggregate types.
...
Before, sizeof() could be applied to a structure field only if that field
was itself a structure. Now it can be applied to PTR and ARRAY fields too.
It's not possible to apply it to scalar fields though, because as soon as
scalar field (int or float) is dereferenced, its value is converted into
Python int/float value, and all original type info is lost. Moreover, we
allow sizeof of type definitions too, and there int is used to represent
(scalar) types. So, we have ambiguity what int may be - either dereferenced
scalar structure field, or encoded scalar type. So, rather throw an error
if user tries to apply sizeof() to int.
2014-10-30 03:50:23 +02:00
Damien George
f5d69794a8
extmod: Add uheapq module.
2014-10-22 23:20:15 +01:00
Paul Sokolovsky
297d8469b8
modure: Update to re1.5 v0.6.1, fixed and extended character class support.
2014-10-17 22:25:18 +03:00
Paul Sokolovsky
95908b0f50
modure: Update to re1.5 v0.6, support for char sets/classes ([a-c]).
2014-10-15 04:44:07 +03:00
Paul Sokolovsky
911c00bbc5
modzlibd: Remove, superceded by moduzlib.
2014-10-13 14:13:22 +03:00
Damien George
4b71c056ef
moduzlib: Fix fn prototype and some code style; use it in stmhal port.
2014-10-12 23:35:38 +01:00
Paul Sokolovsky
bfb6af857a
moduzlib: Import uzlib v1.1.
...
https://github.com/pfalcon/uzlib
2014-10-13 00:09:43 +03:00
Paul Sokolovsky
426bb58b23
moduzlib: New zlib-like module, based on uzlib.
2014-10-13 00:07:43 +03:00
Paul Sokolovsky
1606607bd4
modure: Make sure that re1.5 compiled in only of modure itself is enabled.
...
This is achieved by including re1.5 *.c files straight from modure.c .
2014-10-12 03:40:20 +03:00
Paul Sokolovsky
457c0a606c
modure: Upgrade re1.5 to 0.5.1
...
Changes include:
regexp.h: Add double-include protection.
2014-10-12 03:12:19 +03:00
Paul Sokolovsky
5edbadefc1
modure: Import needed files from re1.5 v0.5.
...
https://github.com/pfalcon/re1.5
2014-10-11 14:36:32 +03:00
Paul Sokolovsky
c71e045165
modure: Initial module, using re1.5 (which is based on re1 codebase).
...
https://github.com/pfalcon/re1.5
2014-10-11 14:36:32 +03:00