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
a649d726
Commit
a649d726
authored
Apr 14, 2016
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py/makeqstrdata: Add special case to handle \n qstr.
parent
2243d683
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/makeqstrdata.py
+6
-0
6 additions, 0 deletions
py/makeqstrdata.py
py/objstr.c
+1
-1
1 addition, 1 deletion
py/objstr.c
with
7 additions
and
1 deletion
py/makeqstrdata.py
+
6
−
0
View file @
a649d726
...
@@ -93,6 +93,12 @@ def parse_input_headers(infiles):
...
@@ -93,6 +93,12 @@ def parse_input_headers(infiles):
# get the qstr value
# get the qstr value
qstr
=
match
.
group
(
1
)
qstr
=
match
.
group
(
1
)
# special case to specify control characters
if
qstr
==
'
\\
n
'
:
qstr
=
'
\n
'
# work out the corresponding qstr name
ident
=
qstr_escape
(
qstr
)
ident
=
qstr_escape
(
qstr
)
# don't add duplicates
# don't add duplicates
...
...
This diff is collapsed.
Click to expand it.
py/objstr.c
+
1
−
1
View file @
a649d726
...
@@ -564,7 +564,7 @@ STATIC mp_obj_t str_splitlines(size_t n_args, const mp_obj_t *pos_args, mp_map_t
...
@@ -564,7 +564,7 @@ STATIC mp_obj_t str_splitlines(size_t n_args, const mp_obj_t *pos_args, mp_map_t
mp_arg_parse_all
(
n_args
-
1
,
pos_args
+
1
,
kw_args
,
mp_arg_parse_all
(
n_args
-
1
,
pos_args
+
1
,
kw_args
,
MP_ARRAY_SIZE
(
allowed_args
),
allowed_args
,
(
mp_arg_val_t
*
)
&
args
);
MP_ARRAY_SIZE
(
allowed_args
),
allowed_args
,
(
mp_arg_val_t
*
)
&
args
);
mp_obj_t
new_args
[
2
]
=
{
pos_args
[
0
],
MP_OBJ_NEW_QSTR
(
MP_QSTR__
backslash_n
)};
mp_obj_t
new_args
[
2
]
=
{
pos_args
[
0
],
MP_OBJ_NEW_QSTR
(
MP_QSTR__
0x0a_
)};
return
str_split_internal
(
2
,
new_args
,
SPLITLINES
|
(
args
.
keepends
.
u_bool
?
KEEP
:
0
));
return
str_split_internal
(
2
,
new_args
,
SPLITLINES
|
(
args
.
keepends
.
u_bool
?
KEEP
:
0
));
}
}
#endif
#endif
...
...
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