From 78a44f70c4608ffb118eed10ab29e810407fe981 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 11 Mar 2018 14:14:32 -0700 Subject: [PATCH] cairo: Banish without-interrupts. --- src/cairo/cairo.scm | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/cairo/cairo.scm b/src/cairo/cairo.scm index 0308b37f0..06ad9395d 100644 --- a/src/cairo/cairo.scm +++ b/src/cairo/cairo.scm @@ -38,7 +38,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (make-cairo-surface-cleanup alien) (named-lambda (cairo-surface-cleanup) - ;;without-interrupts + (assert-without-interruption 'cairo-surface-cleanup) (if (not (alien-null? alien)) (begin (C-call "cairo_surface_destroy" alien) @@ -46,12 +46,10 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (cairo-surface-destroy surface) (check-cairo-surface-status surface) - (without-interrupts + (without-interruption (lambda () (if (not (alien-null? surface)) - (begin - (execute-glib-cleanup surface) - (alien-null! surface)))))) + (execute-glib-cleanup surface))))) (define (check-cairo-surface-status surface) (let ((status (C-call "cairo_surface_status" surface))) @@ -98,7 +96,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (make-cairo-pattern-cleanup alien) (named-lambda (cairo-pattern-cleanup) - ;;without-interrupts + (assert-without-interruption 'cairo-pattern-cleanup) (if (not (alien-null? alien)) (begin (C-call "cairo_pattern_destroy" alien) @@ -106,12 +104,10 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (cairo-pattern-destroy pattern) (check-cairo-pattern-status pattern) - (without-interrupts + (without-interruption (lambda () (if (not (alien-null? pattern)) - (begin - (execute-glib-cleanup pattern) - (alien-null! pattern)))))) + (execute-glib-cleanup pattern))))) (define (check-cairo-pattern-status pattern) (let ((status (C-call "cairo_pattern_status" pattern))) @@ -144,7 +140,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (make-cairo-cleanup alien) (named-lambda (cairo-cleanup) - ;;without-interrupts + (assert-without-interruption 'cairo-cleanup) (if (not (alien-null? alien)) (begin (C-call "cairo_destroy" alien) @@ -152,12 +148,9 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (cairo-destroy cairo) (check-cairo-status cairo) - (without-interrupts + (without-interruption (lambda () - (if (not (alien-null? cairo)) - (begin - (execute-glib-cleanup cairo) - (alien-null! cairo)))))) + (execute-glib-cleanup cairo)))) (define (check-cairo-status cairo) (let ((status (C-call "cairo_status" cairo))) -- 2.25.1