mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 13:49:16 +02:00
Fixed exit
when boolean is passed
Return abnomal status code when false is passed, per R7RS
This commit is contained in:
parent
647e2030ff
commit
574cc630d0
2 changed files with 7 additions and 0 deletions
|
@ -12,6 +12,9 @@ Features
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
|
|
||||||
- Fixed the MSYS2 build script and instructions, so it is possible to build on Windows again!
|
- Fixed the MSYS2 build script and instructions, so it is possible to build on Windows again!
|
||||||
|
- Fixed `exit` to return the appropriate status code when a boolean is passed, per R7RS:
|
||||||
|
|
||||||
|
> If no argument is supplied, or if obj is #t, the exit procedure should communicate to the operating system that the program exited normally. If obj is #f, the exit procedure should communicate to the operating system that the program exited abnormally.
|
||||||
|
|
||||||
Deprecated
|
Deprecated
|
||||||
|
|
||||||
|
|
|
@ -3193,6 +3193,10 @@ void Cyc_halt(object obj)
|
||||||
exit(obj_obj2int(obj));
|
exit(obj_obj2int(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (obj == boolean_f) {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue