* system now passes a bytevector to ik_system.
This commit is contained in:
BIN
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*
|
||||
|
||||
Binary file not shown.
+2
-1
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user