From: Matt Birkholz Date: Thu, 18 Aug 2011 18:34:55 +0000 (-0700) Subject: Warn, not die, when a callback or constant is undefined. X-Git-Tag: release-9.2.0~347^2~2^2~7 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f931463b3d2aebd57e29b243d971c27b4de232cf;p=mit-scheme.git Warn, not die, when a callback or constant is undefined. --- diff --git a/src/ffi/syntax.scm b/src/ffi/syntax.scm index 1f9ad28cb..765dd2da2 100644 --- a/src/ffi/syntax.scm +++ b/src/ffi/syntax.scm @@ -238,7 +238,9 @@ USA. (define (lookup-enum-value name whole-form includes) (let ((entry (assq name (c-includes/enum-values includes)))) (if (not entry) - (serror whole-form "constant not declared") + (begin + (warn "no declaration of constant:" name) + 0) (cdr entry)))) (define (c-enum-constant-values name form includes) @@ -425,7 +427,7 @@ USA. (if (pair? entry) (cdr entry) (begin - (warn "no declaration of C function:" func-name) + (warn "no declaration of callout:" func-name) func-name))))) `(CALL-ALIEN ,alien . ,(map (lambda (form) (close-syntax form usage-env)) @@ -457,7 +459,9 @@ USA. (name (string->symbol obj))) (let ((entry (assq name callbacks))) (if (pair? entry) (cdr entry) - (serror form "C function not declared")))) + (begin + (warn "no declaration of callback:" name) + name)))) (let ((value-form (close-syntax obj usage-env))) `(REGISTER-C-CALLBACK ,value-form))))))))