Update local CFFI to darcs from 1.6.08
[CommonLispStat.git] / external / cffi.darcs / _darcs / pristine / src / package.lisp
blobe205d74cfd929467bf411c7fec903fbc9964c71c
1 ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; package.lisp --- Package definition for CFFI.
4 ;;;
5 ;;; Copyright (C) 2005-2006, James Bielman <jamesjb@jamesjb.com>
6 ;;;
7 ;;; Permission is hereby granted, free of charge, to any person
8 ;;; obtaining a copy of this software and associated documentation
9 ;;; files (the "Software"), to deal in the Software without
10 ;;; restriction, including without limitation the rights to use, copy,
11 ;;; modify, merge, publish, distribute, sublicense, and/or sell copies
12 ;;; of the Software, and to permit persons to whom the Software is
13 ;;; furnished to do so, subject to the following conditions:
14 ;;;
15 ;;; The above copyright notice and this permission notice shall be
16 ;;; included in all copies or substantial portions of the Software.
17 ;;;
18 ;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 ;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 ;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 ;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 ;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 ;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 ;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 ;;; DEALINGS IN THE SOFTWARE.
26 ;;;
28 (in-package #:cl-user)
30 (defpackage #:cffi
31 (:use #:common-lisp #:cffi-sys #:cffi-utils #:alexandria #:babel-encodings)
32 (:import-from #:cffi-features #:cffi-feature-p)
33 (:export
34 ;; Types.
35 #:foreign-pointer
37 ;; Primitive pointer operations.
38 #:foreign-free
39 #:foreign-alloc
40 #:mem-aref
41 #:mem-ref
42 #:pointerp
43 #:pointer-eq
44 #:null-pointer
45 #:null-pointer-p
46 #:inc-pointer
47 #:incf-pointer
48 #:with-foreign-pointer
49 #:make-pointer
50 #:pointer-address
52 ;; Shareable vectors.
53 #:make-shareable-byte-vector
54 #:with-pointer-to-vector-data
56 ;; Foreign string operations.
57 #:*default-foreign-encoding*
58 #:foreign-string-alloc
59 #:foreign-string-free
60 #:foreign-string-to-lisp
61 #:lisp-string-to-foreign
62 #:with-foreign-string
63 #:with-foreign-strings
64 #:with-foreign-pointer-as-string
66 ;; Foreign function operations.
67 #:defcfun
68 #:foreign-funcall
69 #:foreign-funcall-pointer
71 ;; Foreign library operations.
72 #:*foreign-library-directories*
73 #:*darwin-framework-directories*
74 #:define-foreign-library
75 #:load-foreign-library
76 #:load-foreign-library-error
77 #:use-foreign-library
78 #:close-foreign-library
80 ;; Callbacks.
81 #:callback
82 #:get-callback
83 #:defcallback
85 ;; Foreign type operations.
86 #:defcstruct
87 #:defcunion
88 #:defctype
89 #:defcenum
90 #:defbitfield
91 #:define-foreign-type
92 #:define-parse-method
93 #:define-c-struct-wrapper
94 #:foreign-enum-keyword
95 #:foreign-enum-keyword-list
96 #:foreign-enum-value
97 #:foreign-bitfield-symbol-list
98 #:foreign-bitfield-symbols
99 #:foreign-bitfield-value
100 #:foreign-slot-pointer
101 #:foreign-slot-value
102 #:foreign-slot-offset
103 #:foreign-slot-names
104 #:foreign-type-alignment
105 #:foreign-type-size
106 #:with-foreign-object
107 #:with-foreign-objects
108 #:with-foreign-slots
109 #:convert-to-foreign
110 #:convert-from-foreign
111 #:free-converted-object
113 ;; Extensible foreign type operations.
114 #:translate-to-foreign
115 #:translate-from-foreign
116 #:free-translated-object
117 #:expand-to-foreign-dyn
118 #:expand-to-foreign
119 #:expand-from-foreign
121 ;; Foreign globals.
122 #:defcvar
123 #:get-var-pointer
124 #:foreign-symbol-pointer