Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
34162872
Commit
34162872
authored
Oct 12, 2014
by
Paul Sokolovsky
Browse files
moduzlib: Integrate into the system.
parent
426bb58b
Changes
7
Hide whitespace changes
Inline
Side-by-side
py/builtin.h
View file @
34162872
...
...
@@ -89,5 +89,6 @@ extern struct _dummy_t mp_sys_stderr_obj;
// extmod modules
extern
const
mp_obj_module_t
mp_module_uctypes
;
extern
const
mp_obj_module_t
mp_module_zlibd
;
extern
const
mp_obj_module_t
mp_module_uzlib
;
extern
const
mp_obj_module_t
mp_module_ujson
;
extern
const
mp_obj_module_t
mp_module_ure
;
py/builtintables.c
View file @
34162872
...
...
@@ -206,6 +206,9 @@ STATIC const mp_map_elem_t mp_builtin_module_table[] = {
#if MICROPY_PY_ZLIBD
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_zlibd
),
(
mp_obj_t
)
&
mp_module_zlibd
},
#endif
#if MICROPY_PY_UZLIB
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_uzlib
),
(
mp_obj_t
)
&
mp_module_uzlib
},
#endif
#if MICROPY_PY_UJSON
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_ujson
),
(
mp_obj_t
)
&
mp_module_ujson
},
#endif
...
...
py/mpconfig.h
View file @
34162872
...
...
@@ -390,6 +390,10 @@ typedef double mp_float_t;
#define MICROPY_PY_ZLIBD (0)
#endif
#ifndef MICROPY_PY_UZLIB
#define MICROPY_PY_UZLIB (0)
#endif
#ifndef MICROPY_PY_UJSON
#define MICROPY_PY_UJSON (0)
#endif
...
...
py/py.mk
View file @
34162872
...
...
@@ -114,6 +114,7 @@ PY_O_BASENAME = \
../extmod/modzlibd.o
\
../extmod/modujson.o
\
../extmod/modure.o
\
../extmod/moduzlib.o
\
# prepend the build destination prefix to the py object files
PY_O
=
$(
addprefix
$(PY_BUILD)
/,
$(PY_O_BASENAME)
)
...
...
py/qstrdefs.h
View file @
34162872
...
...
@@ -468,6 +468,11 @@ Q(zlibd)
Q
(
decompress
)
#endif
#if MICROPY_PY_UZLIB
Q
(
uzlib
)
Q
(
decompress
)
#endif
#if MICROPY_PY_UJSON
Q
(
ujson
)
Q
(
dumps
)
...
...
tests/extmod/zlibd_decompress.py
View file @
34162872
try
:
import
zlib
except
ImportError
:
import
zlib
d
as
zlib
import
u
zlib
as
zlib
PATTERNS
=
[
# Packed results produced by CPy's zlib.compress()
...
...
unix/mpconfigport.h
View file @
34162872
...
...
@@ -55,7 +55,7 @@
#define MICROPY_PY_GC_COLLECT_RETVAL (1)
#define MICROPY_PY_UCTYPES (1)
#define MICROPY_PY_ZLIB
D
(1)
#define MICROPY_PY_
U
ZLIB (1)
#define MICROPY_PY_UJSON (1)
#define MICROPY_PY_URE (1)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment