os.exit
This commit is contained in:
parent
87dbc4fb80
commit
a81aa80420
BIN
kuroko-pre-upx
Executable file
BIN
kuroko-pre-upx
Executable file
Binary file not shown.
BIN
kuroko-tiny
Executable file
BIN
kuroko-tiny
Executable file
Binary file not shown.
9
src/os.c
9
src/os.c
@ -235,6 +235,12 @@ KRK_FUNC(abort,{
|
||||
abort();
|
||||
})
|
||||
|
||||
KRK_FUNC(exit,{
|
||||
FUNCTION_TAKES_EXACTLY(1);
|
||||
CHECK_ARG(0,int,krk_integer_type,retcode);
|
||||
exit(retcode);
|
||||
})
|
||||
|
||||
KRK_FUNC(remove,{
|
||||
FUNCTION_TAKES_EXACTLY(1);
|
||||
CHECK_ARG(0,str,KrkString*,path);
|
||||
@ -717,6 +723,9 @@ void _createAndBind_osMod(void) {
|
||||
KRK_DOC(BIND_FUNC(module,abort),
|
||||
"@brief Abort the current process.\n\n"
|
||||
"@bsnote{This will exit the interpreter without calling cleanup routines.}");
|
||||
KRK_DOC(BIND_FUNC(module,exit),
|
||||
"@brief Exit the current process.\n\n"
|
||||
"@bsnote{This will exit the interpreter without calling cleanup routines.}");
|
||||
KRK_DOC(BIND_FUNC(module,remove),
|
||||
"@brief Delete a file.\n"
|
||||
"@arguments path\n\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user