;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Mar 2002
;;;;
-;;;; $Id: union.cl,v 1.2 2002/03/21 08:30:10 kevin Exp $
+;;;; $Id: union.cl,v 1.3 2002/03/23 16:32:39 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
(df :double))
(defun test-union-1 ()
- (let ((u (uffi:allocate-foreign-object tunion1)))
+ (let ((u (uffi:allocate-foreign-object 'tunion1)))
(setf (uffi:get-slot-value u 'tunion1 'uint)
(+ (char-code #\A)
(* 256 (char-code #\B))
(* 65536 (char-code #\C))
(* 16777216 255)))
- (format t "~&Should be #\A: ~S"
+ (format *standard-output* "~&Should be #\A: ~S"
(uffi:ensure-char-character
(uffi:get-slot-value u 'tunion1 'char)))
- (format t "~&Should be negative number: ~D"
+ (format *standard-output* "~&Should be negative number: ~D"
(uffi:get-slot-value u 'tunion1 'int))
- (format t "~&Should be positive number: ~D"
+ (format *standard-output* "~&Should be positive number: ~D"
(uffi:get-slot-value u 'tunion1 'uint))
(uffi:free-foreign-object u))
(values))