r5493: *** empty log message ***
[uffi.git] / tests / structs.lisp
diff --git a/tests/structs.lisp b/tests/structs.lisp
new file mode 100644 (file)
index 0000000..1522a15
--- /dev/null
@@ -0,0 +1,34 @@
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          structs.lisp
+;;;; Purpose:       UFFI Example file to strtol, uses pointer arithmetic
+;;;; Programmer:    Kevin M. Rosenberg
+;;;; Date Started:  Feb 2002
+;;;;
+;;;; $Id: structs.lisp,v 1.1 2003/08/13 18:53:42 kevin Exp $
+;;;;
+;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;;
+;;;; *************************************************************************
+
+(in-package #:uffi-tests)
+
+;; Compilation failure as reported by Edi Weitz
+
+
+(uffi:def-struct foo
+    (bar :pointer-self))
+
+(uffi:def-foreign-type foo-ptr (* foo))
+
+(uffi:def-function "baz"
+    ((x :int))
+  :returning foo-ptr
+  :module "frob")
+
+(defun test ()
+  (with-foreign-object (p 'foo)
+    (baz p)))
+