Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
4b71c056
Commit
4b71c056
authored
Oct 12, 2014
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
moduzlib: Fix fn prototype and some code style; use it in stmhal port.
parent
29f56826
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
extmod/moduzlib.c
+3
-4
3 additions, 4 deletions
extmod/moduzlib.c
stmhal/mpconfigport.h
+3
-1
3 additions, 1 deletion
stmhal/mpconfigport.h
stmhal/qstrdefsport.h
+1
-0
1 addition, 0 deletions
stmhal/qstrdefsport.h
with
7 additions
and
5 deletions
extmod/moduzlib.c
+
3
−
4
View file @
4b71c056
...
...
@@ -48,8 +48,7 @@
#define DEBUG_printf(...) (void)0
#endif
STATIC
int
mod_uzlib_grow_buf
(
TINF_DATA
*
d
,
unsigned
alloc_req
)
{
STATIC
int
mod_uzlib_grow_buf
(
TINF_DATA
*
d
,
unsigned
alloc_req
)
{
if
(
alloc_req
<
256
)
{
alloc_req
=
256
;
}
...
...
@@ -59,7 +58,7 @@ STATIC int mod_uzlib_grow_buf(TINF_DATA *d, unsigned alloc_req)
return
0
;
}
STATIC
mp_obj_t
mod_uzlib_decompress
(
uint
n_args
,
mp_obj_t
*
args
)
{
STATIC
mp_obj_t
mod_uzlib_decompress
(
mp_
uint
_t
n_args
,
const
mp_obj_t
*
args
)
{
mp_obj_t
data
=
args
[
0
];
mp_buffer_info_t
bufinfo
;
mp_get_buffer_raise
(
data
,
&
bufinfo
,
MP_BUFFER_READ
);
...
...
This diff is collapsed.
Click to expand it.
stmhal/mpconfigport.h
+
3
−
1
View file @
4b71c056
...
...
@@ -57,7 +57,7 @@
#define MICROPY_PY_IO (1)
#define MICROPY_PY_IO_FILEIO (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)
...
...
@@ -77,6 +77,7 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
extern
const
struct
_mp_obj_module_t
pyb_module
;
extern
const
struct
_mp_obj_module_t
stm_module
;
extern
const
struct
_mp_obj_module_t
mp_module_ure
;
extern
const
struct
_mp_obj_module_t
mp_module_uzlib
;
extern
const
struct
_mp_obj_module_t
mp_module_ujson
;
extern
const
struct
_mp_obj_module_t
mp_module_uos
;
extern
const
struct
_mp_obj_module_t
mp_module_utime
;
...
...
@@ -95,6 +96,7 @@ extern const struct _mp_obj_module_t mp_module_network;
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
{ MP_OBJ_NEW_QSTR(MP_QSTR_re), (mp_obj_t)&mp_module_ure }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_zlib), (mp_obj_t)&mp_module_uzlib }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_json), (mp_obj_t)&mp_module_ujson }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_os), (mp_obj_t)&mp_module_uos }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&mp_module_utime }, \
...
...
This diff is collapsed.
Click to expand it.
stmhal/qstrdefsport.h
+
1
−
0
View file @
4b71c056
...
...
@@ -73,6 +73,7 @@ Q(elapsed_micros)
// for module weak links
Q
(
re
)
Q
(
zlib
)
Q
(
json
)
// for file class
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment