~ chicken-core (chicken-5) 122640ea10f5c84661dd9e0851424f05b7fef301
commit 122640ea10f5c84661dd9e0851424f05b7fef301
Author: Peter Bex <peter@more-magic.net>
AuthorDate: Fri Jun 9 20:34:08 2017 +0200
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Fri Jun 9 20:34:08 2017 +0200
Relax syntax check on `define-foreign-variable`
7079f685 was overly strict when checking the "string" part of the
`define-foreign-variable` form. The documentation states that it must
be a string, but we explicitly allow a symbol as well. There are eggs
using this undocumented feature, like the "socket" egg, so we should
continue to support it on CHICKEN 4.
diff --git a/chicken-ffi-syntax.scm b/chicken-ffi-syntax.scm
index 788ba112..0564c4b2 100644
--- a/chicken-ffi-syntax.scm
+++ b/chicken-ffi-syntax.scm
@@ -203,7 +203,7 @@
'()
(##sys#er-transformer
(lambda (form r c)
- (##sys#check-syntax 'define-foreign-variable form '(_ symbol symbol . #(string 0 1)))
+ (##sys#check-syntax 'define-foreign-variable form '(_ symbol symbol . #(_ 0 1)))
`(##core#define-foreign-variable ,@(cdr form)))))
(##sys#extend-macro-environment
Trap