Booleans are passed as #t/#f in Scheme but ints in C.

This commit is contained in:
Alex Shinn 2013-01-31 22:20:15 +09:00
parent 7e30de04a8
commit 5127e30ab2

View file

@ -140,7 +140,7 @@
(set! *c-int-types* (cons 'type *c-int-types*)))))) (set! *c-int-types* (cons 'type *c-int-types*))))))
(define (signed-int-type? type) (define (signed-int-type? type)
(or (memq type '(signed-char short int long boolean)) (or (memq type '(signed-char short int long))
(memq type *c-int-types*))) (memq type *c-int-types*)))
(define (unsigned-int-type? type) (define (unsigned-int-type? type)
@ -780,6 +780,7 @@
((eq? 'sexp base-type)) ((eq? 'sexp base-type))
((string-type? type) ((string-type? type)
(write-validator arg 'string)) (write-validator arg 'string))
((eq? 'boolean base-type))
(else (else
(warn "don't know how to validate" type))))) (warn "don't know how to validate" type)))))
@ -1729,5 +1730,6 @@
`("-o" ,so ,dest "-lchibi-scheme"))) `("-o" ,so ,dest "-lchibi-scheme")))
(args (cond-expand (args (cond-expand
(macosx (append '("-dynamiclib" "-Oz") base-args)) (macosx (append '("-dynamiclib" "-Oz") base-args))
(else (append '("-fPIC" "-shared" "-Os") base-args))))) (else (append '("-fPIC" "-shared" "-Os") base-args))))
(apply system (if *c++?* "c++" "cc") args)))))) (cc (if *c++?* "c++" "cc")))
(apply system cc args))))))