Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chris Müller
cherry
Commits
5556ce5e
Commit
5556ce5e
authored
Jul 16, 2013
by
Chris Müller
Browse files
Implement (exit FIXNUM)
Add systemcall exit to the runtime environment.
parent
04936952
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/primitives/system.c
View file @
5556ce5e
...
...
@@ -22,6 +22,13 @@
struct
org_cherry_value
*
org_cherry_system_exit
(
struct
org_cherry_environment
*
env
,
struct
org_cherry_value
*
args
)
{
if
(
IS_NULL
(
args
))
exit
(
EXIT_SUCCESS
);
else
if
(
IS_FIXNUM
(
HEAD
(
args
)))
exit
(
HEAD
(
args
)
->
fixnum_value
);
else
org_cherry_env_raise
(
env
,
org_cherry_string
(
"Exit is expecting a fixnum for the first argument"
));
return
org_cherry_false
;
}
...
...
Write
Preview
Markdown
is supported
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