From df6eb1bc392e3e11d96ffc3dc764e1ea00ba2f53 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 26 Jan 2013 10:45:39 -0600 Subject: [PATCH] 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. (cherry picked from commit 2d2b3bee2fed3468a317ee2222f58384822f4b8b) --- collects/drracket/private/language-configuration.rkt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/collects/drracket/private/language-configuration.rkt b/collects/drracket/private/language-configuration.rkt index 8e9303095b..aa2dda4483 100644 --- a/collects/drracket/private/language-configuration.rkt +++ b/collects/drracket/private/language-configuration.rkt @@ -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