Merge branch 'stinos-msvc-extmod'

This commit is contained in:
Damien George 2014-09-02 11:39:12 +01:00
commit 27dd910c44
4 changed files with 7 additions and 4 deletions

View File

@ -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) {

View File

@ -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);

View File

@ -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)

View File

@ -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>