From: Kevin M. Rosenberg Date: Thu, 21 Mar 2002 08:30:10 +0000 (+0000) Subject: r1603: *** empty log message *** X-Git-Tag: v1.6.1~563 X-Git-Url: http://git.kpe.io/?a=commitdiff_plain;h=1796f8c038481234982c983cb0ee611c3ffac4c6;hp=d3f9b63d9227cc2fb7b978e4b40b9592c04852ab;p=uffi.git r1603: *** empty log message *** --- diff --git a/doc/ref.sgml b/doc/ref.sgml index 82ee66a..714d8e9 100644 --- a/doc/ref.sgml +++ b/doc/ref.sgml @@ -868,7 +868,7 @@ can be freed. Syntax - allocate-foreign-object type => ptr + allocate-foreign-object type &optional size => ptr @@ -877,7 +877,15 @@ can be freed. type - A type of foreign object to allocate. + A unevaluated type of foreign object to allocate. + + + + + size + + An optional size parameter. If specified, allocates and returns an +array of type that is size members long. diff --git a/examples/union.cl b/examples/union.cl index 197332f..b876699 100644 --- a/examples/union.cl +++ b/examples/union.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Mar 2002 ;;;; -;;;; $Id: union.cl,v 1.1 2002/03/21 07:56:45 kevin Exp $ +;;;; $Id: union.cl,v 1.2 2002/03/21 08:30:10 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -27,7 +27,7 @@ (defun test-union-1 () (let ((u (uffi:allocate-foreign-object tunion1))) - (setf (uffi:get-slot-value u 'tunion1 'int) + (setf (uffi:get-slot-value u 'tunion1 'uint) (+ (char-code #\A) (* 256 (char-code #\B)) (* 65536 (char-code #\C)) diff --git a/tests/union.cl b/tests/union.cl index 197332f..b876699 100644 --- a/tests/union.cl +++ b/tests/union.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Mar 2002 ;;;; -;;;; $Id: union.cl,v 1.1 2002/03/21 07:56:45 kevin Exp $ +;;;; $Id: union.cl,v 1.2 2002/03/21 08:30:10 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -27,7 +27,7 @@ (defun test-union-1 () (let ((u (uffi:allocate-foreign-object tunion1))) - (setf (uffi:get-slot-value u 'tunion1 'int) + (setf (uffi:get-slot-value u 'tunion1 'uint) (+ (char-code #\A) (* 256 (char-code #\B)) (* 65536 (char-code #\C))