1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

hack around bug in port-filename

* module/ice-9/boot-9.scm (define-module): Until the port-filename bug
  is fixed, hack around it.
This commit is contained in:
Andy Wingo 2011-02-07 21:43:11 +01:00
parent 9d427b2cc3
commit c415fe081e

View file

@ -2872,8 +2872,13 @@ module '(ice-9 q) '(make-q q-length))}."
(and-map symbol? (syntax->datum #'(name name* ...)))
(with-syntax (((quoted-arg ...)
(parse #'(arg ...) '() '() '() '() '()))
(filename (assq-ref (or (syntax-source x) '())
'filename)))
;; Ideally the filename is either a string or #f;
;; this hack is to work around a case in which
;; port-filename returns a symbol (`socket') for
;; sockets.
(filename (let ((f (assq-ref (or (syntax-source x) '())
'filename)))
(and (string? f) f))))
#'(eval-when (eval load compile expand)
(let ((m (define-module* '(name name* ...)
#:filename filename quoted-arg ...)))