Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
non-destructive text 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
Show more breadcrumbs
badge fixer
non-destructive text micropython
Commits
6f0c6bd7
Commit
6f0c6bd7
authored
5 years ago
by
Milan Rossa
Committed by
Damien George
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
unix: Enable sys.atexit, triggered after the main script ends.
parent
cb364700
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ports/unix/main.c
+6
-0
6 additions, 0 deletions
ports/unix/main.c
ports/unix/mpconfigport.h
+1
-0
1 addition, 0 deletions
ports/unix/mpconfigport.h
with
7 additions
and
0 deletions
ports/unix/main.c
+
6
−
0
View file @
6f0c6bd7
...
...
@@ -642,6 +642,12 @@ MP_NOINLINE int main_(int argc, char **argv) {
}
}
#if MICROPY_PY_SYS_ATEXIT
if
(
mp_obj_is_callable
(
MP_STATE_VM
(
sys_exitfunc
)))
{
mp_call_function_0
(
MP_STATE_VM
(
sys_exitfunc
));
}
#endif
#if MICROPY_PY_MICROPYTHON_MEM_INFO
if
(
mp_verbose_flag
)
{
mp_micropython_mem_info
(
0
,
NULL
);
...
...
This diff is collapsed.
Click to expand it.
ports/unix/mpconfigport.h
+
1
−
0
View file @
6f0c6bd7
...
...
@@ -90,6 +90,7 @@
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
#define MICROPY_PY_BUILTINS_SLICE_ATTRS (1)
#define MICROPY_PY_SYS_EXIT (1)
#define MICROPY_PY_SYS_ATEXIT (1)
#if defined(__APPLE__) && defined(__MACH__)
#define MICROPY_PY_SYS_PLATFORM "darwin"
#else
...
...
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