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
GitLab 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
973c87d8
Commit
973c87d8
authored
Aug 22, 2019
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py/objgenerator: Move defn of mp_const_GeneratorExit_obj here.
Because the mp_obj_exception_t type is now globally available.
parent
bc9b656f
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
py/objexcept.c
+0
-5
0 additions, 5 deletions
py/objexcept.c
py/objgenerator.c
+3
-0
3 additions, 0 deletions
py/objgenerator.c
with
3 additions
and
5 deletions
py/objexcept.c
+
0
−
5
View file @
973c87d8
...
@@ -100,11 +100,6 @@ mp_obj_t mp_alloc_emergency_exception_buf(mp_obj_t size_in) {
...
@@ -100,11 +100,6 @@ mp_obj_t mp_alloc_emergency_exception_buf(mp_obj_t size_in) {
#endif
#endif
#endif // MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF
#endif // MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF
// Instance of GeneratorExit exception - needed by generator.close()
// This would belong to objgenerator.c, but to keep mp_obj_exception_t
// definition module-private so far, have it here.
const
mp_obj_exception_t
mp_const_GeneratorExit_obj
=
{{
&
mp_type_GeneratorExit
},
0
,
0
,
NULL
,
(
mp_obj_tuple_t
*
)
&
mp_const_empty_tuple_obj
};
void
mp_obj_exception_print
(
const
mp_print_t
*
print
,
mp_obj_t
o_in
,
mp_print_kind_t
kind
)
{
void
mp_obj_exception_print
(
const
mp_print_t
*
print
,
mp_obj_t
o_in
,
mp_print_kind_t
kind
)
{
mp_obj_exception_t
*
o
=
MP_OBJ_TO_PTR
(
o_in
);
mp_obj_exception_t
*
o
=
MP_OBJ_TO_PTR
(
o_in
);
mp_print_kind_t
k
=
kind
&
~
PRINT_EXC_SUBCLASS
;
mp_print_kind_t
k
=
kind
&
~
PRINT_EXC_SUBCLASS
;
...
...
This diff is collapsed.
Click to expand it.
py/objgenerator.c
+
3
−
0
View file @
973c87d8
...
@@ -34,6 +34,9 @@
...
@@ -34,6 +34,9 @@
#include
"py/objfun.h"
#include
"py/objfun.h"
#include
"py/stackctrl.h"
#include
"py/stackctrl.h"
// Instance of GeneratorExit exception - needed by generator.close()
const
mp_obj_exception_t
mp_const_GeneratorExit_obj
=
{{
&
mp_type_GeneratorExit
},
0
,
0
,
NULL
,
(
mp_obj_tuple_t
*
)
&
mp_const_empty_tuple_obj
};
/******************************************************************************/
/******************************************************************************/
/* generator wrapper */
/* generator wrapper */
...
...
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