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
5e34909a
Commit
5e34909a
authored
Mar 08, 2014
by
Damien George
Browse files
unix: Make usage info reflect actual usage of -X option.
parent
c3d35c6a
Changes
1
Show whitespace changes
Inline
Side-by-side
unix/main.c
View file @
5e34909a
...
...
@@ -209,7 +209,12 @@ mp_obj_t test_obj_new(int value) {
}
int
usage
(
void
)
{
printf
(
"usage: py [-c <command>] [-X <heap size>] [<filename>]
\n
"
);
printf
(
"usage: py [-X <opt>] [-c <command>] [<filename>]
\n
"
"
\n
"
"Implementation specific options:
\n
"
" heapsize=<n> -- set the heap size for the GC
\n
"
);
return
1
;
}
...
...
@@ -242,11 +247,14 @@ void pre_process_options(int argc, char **argv) {
if
(
a
+
1
>=
argc
)
{
exit
(
usage
());
}
if
(
0
)
{
#if MICROPY_ENABLE_GC
if
(
strncmp
(
argv
[
a
+
1
],
"heapsize="
,
sizeof
(
"heapsize="
)
-
1
)
==
0
)
{
}
else
if
(
strncmp
(
argv
[
a
+
1
],
"heapsize="
,
sizeof
(
"heapsize="
)
-
1
)
==
0
)
{
heap_size
=
strtol
(
argv
[
a
+
1
]
+
sizeof
(
"heapsize="
)
-
1
,
NULL
,
0
);
}
#endif
}
else
{
exit
(
usage
());
}
a
++
;
}
}
...
...
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