Kaspar Schleiser
f5dd6f7f37
py/binary: Make return type of mp_binary_get_size size_t instead of int.
Fixes sign-compare warning.
10 years ago
Damien George
51dfcb4bb7
py: Move to guarded includes, everywhere in py/ core.
Addresses issue #1022 .
10 years ago
Damien George
9336ee320a
py: Make mp_binary_set_val work on big endian machine.
10 years ago
Damien George
42f3de924b
py: Convert [u]int to mp_[u]int_t where appropriate.
Addressing issue #50 .
10 years ago
Damien George
953074315e
py: Enable struct/binary-helper to parse q and Q sized ints.
Addresses issue #848 .
10 years ago
Damien George
4abff7500f
py: Change uint to mp_uint_t in runtime.h, stackctrl.h, binary.h.
Part of code cleanup, working towards resolving issue #50 .
10 years ago
Paul Sokolovsky
5fa5ca40e6
binary: Factor out mp_binary_set_int().
10 years ago
Damien George
40f3c02682
Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50 .
11 years ago
Paul Sokolovsky
7a2f166949
modstruct: Fix alignment handling issues.
Also, factor out mp_binary_get_int() function.
11 years ago
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/.
11 years ago
Paul Sokolovsky
6204460461
modstruct: Initial implementation of struct.pack().
11 years ago
Paul Sokolovsky
1355cf42f2
modstruct: Fix .calcsize() to account for struct type/alignment.
11 years ago
Damien George
71e9bfa20d
py: Add mp_binary_set_val_array_from_int, to store an int directly.
11 years ago
Paul Sokolovsky
0c43cf9154
modstruct: Basic implementation of native struct alignment and types.
11 years ago
Paul Sokolovsky
6582d64d01
modstruct: Refactor to support both LE and BE packed structs.
11 years ago
Paul Sokolovsky
e9db840480
py: Start implementing "struct" module.
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.
11 years ago
Paul Sokolovsky
8bc3516389
ffi: Implement ffivar.get()/set() methods.
Done by introducing another factored out helper API in binary.c. This API
can be reused also by array and struct modules.
11 years ago