From 9bd33a6911e778e952b595e7d1ad719ca49d1d3f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 23 Sep 2014 20:50:57 -0600 Subject: [PATCH] racket/draw: remove Pango bug-repair hack for Windows Bug reported as 649293 is apparently fixed, so the hack is no longer needed. --- .../draw-lib/racket/draw/unsafe/pango.rkt | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/pkgs/draw-pkgs/draw-lib/racket/draw/unsafe/pango.rkt b/pkgs/draw-pkgs/draw-lib/racket/draw/unsafe/pango.rkt index e9ecf71a1c..9542e18815 100644 --- a/pkgs/draw-pkgs/draw-lib/racket/draw/unsafe/pango.rkt +++ b/pkgs/draw-pkgs/draw-lib/racket/draw/unsafe/pango.rkt @@ -147,25 +147,9 @@ (define-glib g_queue_new (_pfun -> _GQueue)) (define-gobj raw_g_object_unref _fpointer #:c-id g_object_unref) -(define (unref-font-map v) - (when (eq? (system-type) 'windows) - ;; For version 1.28 of Pango, reported as Bug 649293: - ;; Under Windows, PangoWin32FontMap holds a queue of freed - ;; fonts, and the fonts hold a weak link back to the map. - ;; Unreffing the font map drops the weak links and *then* - ;; tries to release the freed fonts, which leads to failures - ;; releasing the fonts. Work around the bug by manually - ;; flushing the queue of freed fonts before the font map is - ;; unreffed. - (let ([fm (cast v _pointer _PangoWin32FontMap-pointer)]) - (g_queue_foreach (PangoWin32FontMap-freed_fonts fm) raw_g_object_unref #f) - (g_queue_free (PangoWin32FontMap-freed_fonts fm)) - (set-PangoWin32FontMap-freed_fonts! fm (g_queue_new)))) - (g_object_unref v)) - (define-pangocairo pango_cairo_font_map_get_default (_pfun -> PangoFontMap)) ;; not an allocator (define-pangocairo pango_cairo_font_map_new (_pfun -> PangoFontMap) - #:wrap (allocator unref-font-map)) + #:wrap (allocator g_object_unref)) (define-pango pango_context_new (_pfun -> PangoContext) #:wrap (allocator g_object_unref))