From 24ce75f30c297335469ec20494193558ce75cb89 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 14 Jul 2010 12:58:33 -0600 Subject: [PATCH] fix racket/gui/dynamic and add multi-instance checks original commit: fa3d9cdf28bdba2643c54025fee1fcc7dab84376 --- collects/mred/private/wx/common/queue.rkt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/collects/mred/private/wx/common/queue.rkt b/collects/mred/private/wx/common/queue.rkt index 84f20776..0eb66a2d 100644 --- a/collects/mred/private/wx/common/queue.rkt +++ b/collects/mred/private/wx/common/queue.rkt @@ -38,6 +38,15 @@ queue-quit-event) +;; ------------------------------------------------------------ +;; This module must be instantiated only once: + +(define-mz scheme_register_process_global (_fun _string _pointer -> _pointer)) +(let ([v (scheme_register_process_global "GRacket-support-initialized" + (cast 1 _scheme _pointer))]) + (when v + (error "cannot start GRacket a second time in the same process"))) + ;; ------------------------------------------------------------ ;; Create a Scheme evt that is ready when a queue is nonempty