Re: sizeof?

Reini Urban <[email protected]> Thu, 27 Jun 2002 10:14:09 +0000
Newsgroups gmane.lisp.uffi.general
Message-ID <[email protected]>
Kevin Rosenberg schrieb:
> The main design criteria for UFFI is that valid UFFI must work on all
> supported platforms. Currently, ACL objects are represented by untyped
> integers (memory addresses), so it is not possible to find the size of
> an ACL object.
> 
> However, I can probably support (I need to check CMUCL,LW, and ACL
> documentation) returning the size of an object type. Will that
> meet your needs?

In cormanlisp it's trivial:

(CT:SIZEOF <c-type-specifier>) => integer

Examples: 
(in-package :win)
(ct:sizeof 'DWORD) => 4
(ct:sizeof '(DWORD *)) => 4
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/