;;;;
;;;; Name: foreign-var
;;;; Purpose: Tests of foreign variables
-;;;; Programmer: Kevin M. Rosenberg
+;;;; Authors: Kevin M. Rosenberg and Edi Weitz
;;;; Date Started: Aug 2003
;;;;
-;;;; $Id: foreign-var.lisp,v 1.3 2003/08/15 02:34:34 kevin Exp $
+;;;; $Id$
;;;;
;;;; *************************************************************************
(d :double))
(uffi:def-foreign-var ("fvar_struct" *fvar-struct*) fvar-struct
- "uffi_tests")
+ "c-uffi-tests")
(uffi:def-function ("fvar_struct_int" fvar-struct-int)
()
:returning :int
- :module "uffi_tests")
+ :module "c-uffi-test")
(uffi:def-function ("fvar_struct_double" fvar-struct-double)
()
:returning :double
- :module "uffi_tests")
+ :module "c-uffi-test")
(deftest fvarst.1 *fvar-addend* 3)
(deftest fvarst.2 (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) 42)
(setf *fvar-addend* orig)))
48)
-;;(decf (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) 10)
-;;(deftest fvarst.8 (fvar-struct-int) 38)
+(deftest fvarst.8
+ (let ((orig (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i)))
+ (decf (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) 10)
+ (prog1
+ (fvar-struct-int)
+ (setf (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) orig)))
+ 35)