projects
/
uffi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r11023: 2006-08-13 Kevin Rosenberg (kevin@rosenberg.net)
[uffi.git]
/
examples
/
union.lisp
diff --git
a/examples/union.lisp
b/examples/union.lisp
index 5b22be2cdfa0e03615363c26327ab69bd874f5a6..c7022d83a79db2600e4b64166a2234c78a0a273a 100644
(file)
--- a/
examples/union.lisp
+++ b/
examples/union.lisp
@@
-7,13
+7,10
@@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Mar 2002
;;;;
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Mar 2002
;;;;
-;;;; $Id
: union.lisp,v 1.2 2002/12/03 06:58:39 kevin Exp
$
+;;;; $Id$
;;;;
;;;;
-;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; This file, part of UFFI, is Copyright (c) 2002
-2005
by Kevin M. Rosenberg
;;;;
;;;;
-;;;; UFFI users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the Lisp Lesser GNU Public License
-;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
;;;; *************************************************************************
(in-package :cl-user)
;;;; *************************************************************************
(in-package :cl-user)
@@
-29,7
+26,7
@@
(let ((u (uffi:allocate-foreign-object 'tunion1)))
(setf (uffi:get-slot-value u 'tunion1 'uint)
;; little endian
(let ((u (uffi:allocate-foreign-object 'tunion1)))
(setf (uffi:get-slot-value u 'tunion1 'uint)
;; little endian
- #-(or sparc sparc-v9 powerpc ppc
little
-endian)
+ #-(or sparc sparc-v9 powerpc ppc
big
-endian)
(+ (* 1 (char-code #\A))
(* 256 (char-code #\B))
(* 65536 (char-code #\C))
(+ (* 1 (char-code #\A))
(* 256 (char-code #\B))
(* 65536 (char-code #\C))
@@
-69,7
+66,7
@@
#\A
:test #'eql
:fail-info "Error with union character")
#\A
:test #'eql
:fail-info "Error with union character")
- #-(or sparc sparc-v9
mc
l)
+ #-(or sparc sparc-v9
openmcl digitoo
l)
;; (util.test:test (> 0 (uffi:get-slot-value u 'tunion1 'int))
;; t
;; :fail-info
;; (util.test:test (> 0 (uffi:get-slot-value u 'tunion1 'int))
;; t
;; :fail-info