Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
70193b2b
Commit
70193b2b
authored
Apr 04, 2014
by
Paul Sokolovsky
Browse files
unix: Routines related to terminal reading should use system malloc.
Otherwise we have mixup between system and GC alloc.
parent
a7752a45
Changes
1
Hide whitespace changes
Inline
Side-by-side
unix/main.c
View file @
70193b2b
...
...
@@ -97,7 +97,7 @@ static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind
static
char
*
strjoin
(
const
char
*
s1
,
int
sep_char
,
const
char
*
s2
)
{
int
l1
=
strlen
(
s1
);
int
l2
=
strlen
(
s2
);
char
*
s
=
m
_new
(
char
,
l1
+
l2
+
2
);
char
*
s
=
m
alloc
(
l1
+
l2
+
2
);
memcpy
(
s
,
s1
,
l1
);
if
(
sep_char
!=
0
)
{
s
[
l1
]
=
sep_char
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment