From 1fa7e4dd02d5669f200f69ad12b73caa3ae530dc Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 13 Feb 2013 16:06:09 +0100 Subject: [PATCH] #f is a null pointer for glut callbacks * figl/glut/types.scm (coerce-callback-pointer/ephemeral): (coerce-callback-pointer/sticky): Allow #f to indicate a null pointer. --- figl/glut/types.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/figl/glut/types.scm b/figl/glut/types.scm index 9a043f6..9d1befd 100644 --- a/figl/glut/types.scm +++ b/figl/glut/types.scm @@ -83,6 +83,8 @@ (define (coerce-callback-pointer/ephemeral x return-type arg-types) (cond + ((not x) + ffi:%null-pointer) ((ffi:pointer? x) x) ((procedure? x) @@ -98,6 +100,8 @@ (define (coerce-callback-pointer/sticky x return-type arg-types) (cond + ((not x) + ffi:%null-pointer) ((ffi:pointer? x) x) ((procedure? x) -- 2.20.1