* 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
|
ikp
|
||||||
ik_system(ikp str){
|
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*
|
static char*
|
||||||
|
|
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -30,7 +30,8 @@
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
(unless (string? x)
|
(unless (string? x)
|
||||||
(error 'system "~s is not a 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)
|
(if (fx= rv -1)
|
||||||
(error 'system "failed")
|
(error 'system "failed")
|
||||||
rv))))
|
rv))))
|
||||||
|
|
|
@ -467,6 +467,8 @@
|
||||||
[immediate? i]
|
[immediate? i]
|
||||||
[pointer-value i]
|
[pointer-value i]
|
||||||
|
|
||||||
|
[system i]
|
||||||
|
|
||||||
[installed-libraries i]
|
[installed-libraries i]
|
||||||
[compile-core-expr-to-port $boot]
|
[compile-core-expr-to-port $boot]
|
||||||
[current-primitive-locations $boot]
|
[current-primitive-locations $boot]
|
||||||
|
|
Loading…
Reference in New Issue