X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/15027ee025095554bc3d1e4f1021b650f2494778..3ffa2453c2bc305bff377d4fe6a37bcc51c7f26b:/gffi/memory.lisp?ds=inline diff --git a/gffi/memory.lisp b/gffi/memory.lisp index fd09f90..042057e 100644 --- a/gffi/memory.lisp +++ b/gffi/memory.lisp @@ -20,7 +20,7 @@ ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;; $Id: memory.lisp,v 1.1 2006/04/25 20:31:35 espen Exp $ +;; $Id: memory.lisp,v 1.2 2006/06/08 13:24:25 espen Exp $ (in-package "GFFI") @@ -141,4 +141,9 @@ (defun sb-sizeof-bits (type) (sb-alien-internals:parse-alien-type type nil))) (defun sb-sizeof (type) - (/ (sb-sizeof-bits type) 8))) + (/ (sb-sizeof-bits type) 8)) + + (defun sb-alignment (type) + (/ (sb-alien-internals:alien-type-alignment + (sb-alien-internals:parse-alien-type type nil)) + 8)))