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
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
89755ae6
Commit
89755ae6
authored
10 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py: Rename MICROPY_SYS_EXIT to MICROPY_MOD_SYS_EXIT.
For consistency with MICROPY_MOD_SYS_STDFILES, etc.
parent
f92a0d4d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
py/modsys.c
+5
-6
5 additions, 6 deletions
py/modsys.c
py/mpconfig.h
+6
-5
6 additions, 5 deletions
py/mpconfig.h
stmhal/mpconfigport.h
+1
-1
1 addition, 1 deletion
stmhal/mpconfigport.h
unix/mpconfigport.h
+1
-1
1 addition, 1 deletion
unix/mpconfigport.h
with
13 additions
and
13 deletions
py/modsys.c
+
5
−
6
View file @
89755ae6
...
...
@@ -36,11 +36,10 @@
#if MICROPY_ENABLE_MOD_SYS
MP_DECLARE_CONST_FUN_OBJ
(
mp_sys_exit_obj
);
// These should be implemented by ports, specific types don't matter,
// only addresses.
struct
_dummy_t
;
extern
struct
_dummy_t
mp_sys_exit_obj
;
extern
struct
_dummy_t
mp_sys_stdin_obj
;
extern
struct
_dummy_t
mp_sys_stdout_obj
;
extern
struct
_dummy_t
mp_sys_stderr_obj
;
...
...
@@ -55,10 +54,6 @@ STATIC const MP_DEFINE_STR_OBJ(version_obj, "3.4.0");
STATIC
const
mp_map_elem_t
mp_module_sys_globals_table
[]
=
{
{
MP_OBJ_NEW_QSTR
(
MP_QSTR___name__
),
MP_OBJ_NEW_QSTR
(
MP_QSTR_sys
)
},
#if MICROPY_SYS_EXIT
// Should be implemented by port
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_exit
),
(
mp_obj_t
)
&
mp_sys_exit_obj
},
#endif
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_path
),
(
mp_obj_t
)
&
mp_sys_path_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_argv
),
(
mp_obj_t
)
&
mp_sys_argv_obj
},
...
...
@@ -70,6 +65,10 @@ STATIC const mp_map_elem_t mp_module_sys_globals_table[] = {
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_byteorder
),
MP_OBJ_NEW_QSTR
(
MP_QSTR_big
)
},
#endif
#if MICROPY_MOD_SYS_EXIT
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_exit
),
(
mp_obj_t
)
&
mp_sys_exit_obj
},
#endif
#if MICROPY_MOD_SYS_STDFILES
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_stdin
),
(
mp_obj_t
)
&
mp_sys_stdin_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_stdout
),
(
mp_obj_t
)
&
mp_sys_stdout_obj
},
...
...
This diff is collapsed.
Click to expand it.
py/mpconfig.h
+
6
−
5
View file @
89755ae6
...
...
@@ -235,13 +235,14 @@ typedef double mp_float_t;
#define MICROPY_ENABLE_MOD_SYS (1)
#endif
#ifndef MICROPY_MOD_SYS_STDFILES
#define MICROPY_MOD_SYS_STDFILES (0)
// sys.exit() availability
#ifndef MICROPY_MOD_SYS_EXIT
#define MICROPY_MOD_SYS_EXIT (0)
#endif
// sys.
exit()
availability
#ifndef MICROPY_
SYS_EXIT
#define MICROPY_
SYS_EXIT
(0)
// sys.
{stdin,stdout,stderr}
availability
#ifndef MICROPY_
MOD_SYS_STDFILES
#define MICROPY_
MOD_SYS_STDFILES
(0)
#endif
// Whether to support slice object and correspondingly
...
...
This diff is collapsed.
Click to expand it.
stmhal/mpconfigport.h
+
1
−
1
View file @
89755ae6
...
...
@@ -45,8 +45,8 @@
*/
#define MICROPY_ENABLE_LFN (1)
#define MICROPY_LFN_CODE_PAGE (437)
/* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_MOD_SYS_EXIT (1)
#define MICROPY_MOD_SYS_STDFILES (1)
#define MICROPY_SYS_EXIT (1)
#define MICROPY_ENABLE_MOD_CMATH (1)
// extra built in names to add to the global namespace
...
...
This diff is collapsed.
Click to expand it.
unix/mpconfigport.h
+
1
−
1
View file @
89755ae6
...
...
@@ -42,9 +42,9 @@
#define MICROPY_PATH_MAX (PATH_MAX)
#define MICROPY_STREAMS_NON_BLOCK (1)
#define MICROPY_USE_COMPUTED_GOTO (1)
#define MICROPY_MOD_SYS_EXIT (1)
#define MICROPY_MOD_SYS_STDFILES (1)
#define MICROPY_ENABLE_MOD_CMATH (1)
#define MICROPY_SYS_EXIT (1)
// Define to MICROPY_ERROR_REPORTING_DETAILED to get function, etc.
// names in exception messages (may require more RAM).
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)
...
...
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