From 737b0fe346a32bd161cbe40acb691aef5381fd12 Mon Sep 17 00:00:00 2001 From: Daniel Hartwig Date: Sun, 10 Feb 2013 17:23:10 +0800 Subject: [PATCH] use ptrdiff_t, not guesswork * figl/gl/types.scm (GLintptr, GLsizeiptr): Define as ptrdiff_t from recent Guile. Fixed a bug where this was set to an unsigned type. Add note that about non-Mesa platforms. --- figl/gl/types.scm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/figl/gl/types.scm b/figl/gl/types.scm index 4ba5ff1..9b5da2e 100644 --- a/figl/gl/types.scm +++ b/figl/gl/types.scm @@ -81,11 +81,9 @@ const-GLvoid-** void-*)) -(define %ptr - (case (ffi:sizeof '*) - ((4) ffi:uint32) - ((8) ffi:uint64) - (else (error "unknown pointer size")))) +;; TODO: Taken from Mesa headers for some types below. Not clear what +;; these types are on other platforms. +(define %ptr ffi:ptrdiff_t) (define-simple-foreign-type void ffi:void) (define-simple-foreign-type GLboolean ffi:uint8) -- 2.20.1