* system now passes a bytevector to ik_system.

This commit is contained in:
Abdulaziz Ghuloum 2007-05-18 22:15:52 -04:00
parent 862871a787
commit b54cc9a762
5 changed files with 10 additions and 2 deletions

Binary file not shown.

View File

@ -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.

View File

@ -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))))

View File

@ -467,6 +467,8 @@
[immediate? i]
[pointer-value i]
[system i]
[installed-libraries i]
[compile-core-expr-to-port $boot]
[current-primitive-locations $boot]