* system now passes a bytevector to ik_system.
This commit is contained in:
parent
862871a787
commit
b54cc9a762
BIN
bin/ikarus
BIN
bin/ikarus
Binary file not shown.
|
@ -672,7 +672,12 @@ ikp ik_close(ikp fd){
|
|||
|
||||
ikp
|
||||
ik_system(ikp str){
|
||||
return fix(system(string_data(str)));
|
||||
if(tagof(str) == bytevector_tag){
|
||||
return fix(system((char*)str+off_bytevector_data));
|
||||
} else {
|
||||
fprintf(stderr, "bug in ik_system\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
static char*
|
||||
|
|
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -30,7 +30,8 @@
|
|||
(lambda (x)
|
||||
(unless (string? x)
|
||||
(error 'system "~s is not a string" x))
|
||||
(let ([rv (foreign-call "ik_system" x)])
|
||||
(let ([rv (foreign-call "ik_system"
|
||||
(string->utf8-bytevector x))])
|
||||
(if (fx= rv -1)
|
||||
(error 'system "failed")
|
||||
rv))))
|
||||
|
|
|
@ -467,6 +467,8 @@
|
|||
[immediate? i]
|
||||
[pointer-value i]
|
||||
|
||||
[system i]
|
||||
|
||||
[installed-libraries i]
|
||||
[compile-core-expr-to-port $boot]
|
||||
[current-primitive-locations $boot]
|
||||
|
|
Loading…
Reference in New Issue