fix a bug in executable creation

The code used eq? to check to see if a given language was in
an list of allowed-to-create-executables languages. But the
language object was passing thru TR and so eq? didn't hold and
thus the check was buggy.
This commit is contained in:
Robby Findler 2013-01-26 10:45:39 -06:00
parent aaf4a2e16d
commit 2d2b3bee2f

View File

@ -85,9 +85,11 @@
(define languages null)
(define languages-allowing-executable-creation '())
(define (language-allows-executable-creation? lang)
(and (memq lang languages-allowing-executable-creation)
#t))
(define (language-allows-executable-creation? candidate-lang)
(define candidates-positions (send candidate-lang get-language-position))
(for/or ([allowed-lang (in-list languages-allowing-executable-creation)])
(equal? (send allowed-lang get-language-position)
candidates-positions)))
;; add-language : (instanceof language%) -> void
;; only allows addition on phase2