diff options
author | Damien George <damien.p.george@gmail.com> | 2014-09-02 11:39:12 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-09-02 11:39:12 +0100 |
commit | 27dd910c446e89fadb6aecac5175c8c2ccbac5ff (patch) | |
tree | 6aee913e261043ad680e2fa5076060fcf1932492 | |
parent | bad2df3e95cd5719099319d71590a79bf6bc4493 (diff) | |
parent | e875e3882d9c567a8b2dc88e9f13e1057fc39e9f (diff) | |
download | micropython-27dd910c446e89fadb6aecac5175c8c2ccbac5ff.tar.gz micropython-27dd910c446e89fadb6aecac5175c8c2ccbac5ff.zip |
Merge branch 'stinos-msvc-extmod'
-rw-r--r-- | extmod/moductypes.c | 4 | ||||
-rw-r--r-- | extmod/modzlibd.c | 2 | ||||
-rw-r--r-- | windows/mpconfigport.h | 2 | ||||
-rw-r--r-- | windows/msvc/sources.props | 3 |
4 files changed, 7 insertions, 4 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c index 0f28a34688..73a8db7cc0 100644 --- a/extmod/moductypes.c +++ b/extmod/moductypes.c @@ -261,10 +261,10 @@ STATIC inline mp_obj_t get_unaligned(uint val_type, void *p, int big_endian) { } } -STATIC inline void set_unaligned(uint val_type, void *p, int big_endian, mp_obj_t val) { +STATIC inline void set_unaligned(uint val_type, byte *p, int big_endian, mp_obj_t val) { char struct_type = big_endian ? '>' : '<'; static const char type2char[8] = "BbHhIiQq"; - mp_binary_set_val(struct_type, type2char[val_type], val, (byte**)&p); + mp_binary_set_val(struct_type, type2char[val_type], val, &p); } static inline mp_uint_t get_aligned_basic(uint val_type, void *p) { diff --git a/extmod/modzlibd.c b/extmod/modzlibd.c index dbf992f919..696b7c8ecf 100644 --- a/extmod/modzlibd.c +++ b/extmod/modzlibd.c @@ -64,7 +64,7 @@ STATIC mp_obj_t mod_zlibd_decompress(uint n_args, mp_obj_t *args) { size_t in_buf_sz = bufinfo.len - in_buf_ofs; DEBUG_printf("tinfl in: in_ofs=%d in_sz=%d dst_ofs=%d, dst_sz=%d\n", in_buf_ofs, in_buf_sz, dst_buf_ofs, dst_buf_sz); tinfl_status st = tinfl_decompress(decomp, - bufinfo.buf + in_buf_ofs, &in_buf_sz, + (mz_uint8*) bufinfo.buf + in_buf_ofs, &in_buf_sz, out, out + dst_buf_ofs, &dst_buf_sz, TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | TINFL_FLAG_PARSE_ZLIB_HEADER); DEBUG_printf("tinfl out: st=%d, in_sz=%d, out_sz=%d\n", st, in_buf_sz, dst_buf_sz); diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h index c5def75923..852ca3f5fb 100644 --- a/windows/mpconfigport.h +++ b/windows/mpconfigport.h @@ -54,6 +54,8 @@ #define MICROPY_PY_CMATH (1) #define MICROPY_PY_IO_FILEIO (1) #define MICROPY_PY_GC_COLLECT_RETVAL (1) +#define MICROPY_PY_UCTYPES (1) +#define MICROPY_PY_ZLIBD (1) #define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED) #ifdef _MSC_VER #define MICROPY_GCREGS_SETJMP (1) diff --git a/windows/msvc/sources.props b/windows/msvc/sources.props index 6fd3306b92..b48277ff29 100644 --- a/windows/msvc/sources.props +++ b/windows/msvc/sources.props @@ -5,7 +5,8 @@ </PropertyGroup> <ItemGroup> <ClCompile Include="$(PyBaseDir)py\*.c" /> - <ClCompile Include="$(PyBaseDir)unix\*.c" Exclude="$(PyBaseDir)unix\modffi.c;$(PyBaseDir)unix\modsocket.c;$(PyBaseDir)unix\seg_helpers.c" /> + <ClCompile Include="$(PyBaseDir)extmod\*.c" /> + <ClCompile Include="$(PyBaseDir)unix\*.c" Exclude="$(PyBaseDir)unix\modffi.c;$(PyBaseDir)unix\modsocket.c;$(PyBaseDir)unix\modtermios.c;$(PyBaseDir)unix\seg_helpers.c" /> <ClCompile Include="$(PyBaseDir)windows\*.c" /> <ClCompile Include="$(PyBaseDir)windows\msvc\*.c" /> </ItemGroup> |