[Openmcl-devel] FFI questions
R. Matthew Emerson
rme at clozure.com
Wed Oct 31 18:22:54 UTC 2007
On Oct 31, 2007, at 1:10 PM, Ron Garret wrote:
> Couple o' questions about the FFI:
> 1. Is there an FFI equivalent to the C sizeof operator?
ccl::foreign-size should do the job.
Welcome to Clozure Common Lisp Version 1.1-r7569 (DarwinX8664)!
? (ccl::foreign-size :id)
? (ccl::foreign-size :<NSR>ect)
? (ccl::foreign-size (:struct :timeval))
By default, the size is returned in bits, but you can ask for the size
in bytes or machine words by specifying :bytes or :words as an
optional last argument.
? (ccl::foreign-size :<NSR>ect :bytes)
More information about the Openmcl-devel