r5493: *** empty log message ***
[uffi.git] / tests / structs.lisp
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          structs.lisp
6 ;;;; Purpose:       UFFI Example file to strtol, uses pointer arithmetic
7 ;;;; Programmer:    Kevin M. Rosenberg
8 ;;;; Date Started:  Feb 2002
9 ;;;;
10 ;;;; $Id: structs.lisp,v 1.1 2003/08/13 18:53:42 kevin Exp $
11 ;;;;
12 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
13 ;;;;
14 ;;;; *************************************************************************
15
16 (in-package #:uffi-tests)
17
18 ;; Compilation failure as reported by Edi Weitz
19
20
21 (uffi:def-struct foo
22     (bar :pointer-self))
23
24 (uffi:def-foreign-type foo-ptr (* foo))
25
26 (uffi:def-function "baz"
27     ((x :int))
28   :returning foo-ptr
29   :module "frob")
30
31 (defun test ()
32   (with-foreign-object (p 'foo)
33     (baz p)))
34