Added (pointer-size) to lib/ikarus/foreign.ss

This commit is contained in:
Abdulaziz Ghuloum 2008-11-21 06:00:28 -05:00
parent 6922b0d9c2
commit b9519122fe
1 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,5 @@
(library (ikarus foreign)
(export
pointer-set-c-char!
pointer-set-c-short!
@ -25,7 +24,14 @@
malloc free
pointer->integer integer->pointer pointer? dlopen dlsym
dlclose dlerror
make-c-callout make-c-callback)
make-c-callout make-c-callback
pointer-size)
(import (ikarus system $foreign)))
(import (ikarus system $foreign))
(define (pointer-size)
(cond
[(<= (fixnum-width) 32) 4]
[else 8]))
)