mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Error on unfulfilled cond-expand.
This complies with the SRFI 0 specification, and avoids the undefined behavior of R7RS.
This commit is contained in:
parent
a844854536
commit
7b9b7d0e67
3 changed files with 5 additions and 3 deletions
|
@ -4,4 +4,5 @@
|
||||||
|
|
||||||
(define-c void (eval-script! "emscripten_run_script") (string))
|
(define-c void (eval-script! "emscripten_run_script") (string))
|
||||||
(define-c int (integer-eval-script "emscripten_run_script_int") (string))
|
(define-c int (integer-eval-script "emscripten_run_script_int") (string))
|
||||||
(define-c string (string-eval-script "emscripten_run_script_string") (string))))
|
(define-c string (string-eval-script "emscripten_run_script_string") (string)))
|
||||||
|
(else))
|
||||||
|
|
|
@ -382,7 +382,7 @@
|
||||||
(memq (identifier->symbol x) *features*)))
|
(memq (identifier->symbol x) *features*)))
|
||||||
(let expand ((ls (cdr expr)))
|
(let expand ((ls (cdr expr)))
|
||||||
(cond
|
(cond
|
||||||
((null? ls)) ; (error "cond-expand: no expansions" expr)
|
((null? ls) (error "cond-expand: no expansions" expr))
|
||||||
((not (pair? (car ls))) (error "cond-expand: bad clause" (car ls)))
|
((not (pair? (car ls))) (error "cond-expand: bad clause" (car ls)))
|
||||||
((eq? 'else (identifier->symbol (caar ls)))
|
((eq? 'else (identifier->symbol (caar ls)))
|
||||||
(if (pair? (cdr ls))
|
(if (pair? (cdr ls))
|
||||||
|
|
|
@ -171,7 +171,8 @@ double sexp_compute_least_double(double f) {
|
||||||
(define-c double (flgamma "tgamma") (double))
|
(define-c double (flgamma "tgamma") (double))
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(windows
|
(windows
|
||||||
(c-include-verbatim "lgamma_r.c")))
|
(c-include-verbatim "lgamma_r.c"))
|
||||||
|
(else))
|
||||||
(define-c double lgamma_r (double (result int)))
|
(define-c double lgamma_r (double (result int)))
|
||||||
|
|
||||||
(define-c double (flfirst-bessel "jn") (int double))
|
(define-c double (flfirst-bessel "jn") (int double))
|
||||||
|
|
Loading…
Add table
Reference in a new issue