File: ref_declare.xml

package info (click to toggle)
ecl 16.1.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 18,600 kB
  • sloc: ansic: 147,936; lisp: 63,863; xml: 7,945; asm: 5,551; sh: 3,145; makefile: 1,950; cpp: 178; java: 116
file content (87 lines) | stat: -rw-r--r-- 2,202 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book [
<!ENTITY % eclent SYSTEM "../ecl.ent">
%eclent;
]>
<book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
 <reference xml:id="uffi.ref_declarations">
  <title>Declarations</title>
  
  <partintro>
   <sect1>
    <title>Overview</title>
    <para>Declarations are used to give the compiler optimizing
    information about foreign types. Currently, only &CMUCL;
    supports declarations. On &ACL; and &LW;, these expressions 
    declare the type generically as &t;
    </para>
   </sect1>
  </partintro>

  <refentry xml:id="uffi.def-type">
   <refnamediv>
    <refname>def-type</refname>
    <refpurpose>Defines a Common Lisp type. 
    </refpurpose>
    <refclass>Macro</refclass>
   </refnamediv>
   <refsynopsisdiv>
    <title>Syntax</title>
    <synopsis>
     <function>def-type</function> <replaceable>name type</replaceable>
    </synopsis>
    <variablelist>
     <varlistentry>
      <term><parameter>name</parameter></term>
      <listitem>
       <para>A symbol naming the type</para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term><parameter>type</parameter></term>
      <listitem>
       <para>A form that specifies the &UFFI; type. It is not evaluated.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </refsynopsisdiv>
   <refsect1>
    <title>Description</title>
    <para>Defines a Common Lisp type based on a &UFFI; type.
    </para>
   </refsect1>
   <refsect1>
    <title>Examples</title>
    <screen>
(def-type char-ptr '(* :char))
   ...
(defun foo (ptr)
  (declare (type char-ptr ptr))
   ...
    </screen>
   </refsect1>
   <refsect1>
    <title>Side Effects</title>
    <para>Defines a new &CommonLisp; type.</para>
   </refsect1>
   <refsect1>
    <title>Affected by</title>
    <para>None.</para>
   </refsect1>
   <refsect1>
    <title>Exceptional Situations</title>
    <para>None.</para>
   </refsect1>
  </refentry>
 </reference>
</book>
<!-- Keep this comment at the end of the file
     Local variables:
     mode: nxml
     sgml-indent-step: 1
     nxml-child-indent: 1
     nxml-outline-child-indent: 0
     fill-column: 79
     End:
-->