Huge update to the Allegrocl module. Better C support. C++ support

added. Documentation! Makes use of typemaps for better interface
tuning. Improved type support. Wrapping of foreign pointers in
CLOS objects; hopefully a step toward being able to extend C++
classes from Lisp.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7828 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Ahmon Dancy 2005-11-09 20:44:22 +00:00
commit f7ebb5809b
22 changed files with 3703 additions and 882 deletions

View file

@ -8,7 +8,7 @@
<body bgcolor="#ffffff">
<H1><a name="Chicken"></a>17 SWIG and Chicken</H1>
<H1><a name="Chicken"></a>19 SWIG and Chicken</H1>
<!-- INDEX -->
<div class="sectiontoc">
<ul>
@ -69,7 +69,7 @@
</p>
<H2><a name="Chicken_nn2"></a>17.1 Preliminaries</H2>
<H2><a name="Chicken_nn2"></a>19.1 Preliminaries</H2>
<p>
@ -87,7 +87,7 @@
CHICKEN.
</p>
<H3><a name="Chicken_nn3"></a>17.1.1 Running SWIG in C mode</H3>
<H3><a name="Chicken_nn3"></a>19.1.1 Running SWIG in C mode</H3>
<p>
@ -120,7 +120,7 @@
object files and linked into your project.
</p>
<H3><a name="Chicken_nn4"></a>17.1.2 Running SWIG in C++ mode</H3>
<H3><a name="Chicken_nn4"></a>19.1.2 Running SWIG in C++ mode</H3>
<p>
@ -149,10 +149,10 @@
object files and linked into your project.
</p>
<H2><a name="Chicken_nn5"></a>17.2 Code Generation</H2>
<H2><a name="Chicken_nn5"></a>19.2 Code Generation</H2>
<H3><a name="Chicken_nn6"></a>17.2.1 Naming Conventions</H3>
<H3><a name="Chicken_nn6"></a>19.2.1 Naming Conventions</H3>
<p>
@ -168,7 +168,7 @@
<tt>%rename</tt> SWIG directive in the SWIG interface file.
</p>
<H3><a name="Chicken_nn7"></a>17.2.2 Modules</H3>
<H3><a name="Chicken_nn7"></a>19.2.2 Modules</H3>
<p>
@ -190,7 +190,7 @@
(uses <i>modulename</i>))</code> CHICKEN Scheme form.
</p>
<H3><a name="Chicken_nn8"></a>17.2.3 Constants and Variables</H3>
<H3><a name="Chicken_nn8"></a>19.2.3 Constants and Variables</H3>
<p>
@ -217,7 +217,7 @@
use <tt>(my-variable)</tt>.
</p>
<H3><a name="Chicken_nn9"></a>17.2.4 Functions</H3>
<H3><a name="Chicken_nn9"></a>19.2.4 Functions</H3>
<p>
@ -236,7 +236,7 @@
parameters). The return values can then be accessed with <code>(call-with-values)</code>.
</p>
<H3><a name="Chicken_nn10"></a>17.2.5 Exceptions</H3>
<H3><a name="Chicken_nn10"></a>19.2.5 Exceptions</H3>
<p>The SWIG chicken module has support for exceptions thrown from
@ -278,7 +278,7 @@
</pre></div>
<H2><a name="Chicken_nn11"></a>17.3 TinyCLOS</H2>
<H2><a name="Chicken_nn11"></a>19.3 TinyCLOS</H2>
<p>
@ -321,7 +321,7 @@
</p>
<H2><a name="Chicken_nn12"></a>17.4 Linkage</H2>
<H2><a name="Chicken_nn12"></a>19.4 Linkage</H2>
<p>
@ -342,7 +342,7 @@
</p>
<H3><a name="Chicken_nn13"></a>17.4.1 Static binary or shared library linked at compile time</H3>
<H3><a name="Chicken_nn13"></a>19.4.1 Static binary or shared library linked at compile time</H3>
<p>We can easily use csc to build a static binary.</p>
@ -383,7 +383,7 @@ in which case the test script does not need to be linked with example.so. The t
be run with <tt>csi</tt>.
</p>
<H3><a name="Chicken_nn14"></a>17.4.2 Building chicken extension libraries</H3>
<H3><a name="Chicken_nn14"></a>19.4.2 Building chicken extension libraries</H3>
<p>Building a shared library like in the above section only works if the library
@ -441,7 +441,7 @@ distributed and used by anyone, even if SWIG is not installed.</p>
<p>See the <tt>Examples/chicken/egg</tt> directory in the SWIG source for an example that builds
two eggs, one using the first method and one using the second method.</p>
<H3><a name="Chicken_nn15"></a>17.4.3 Linking multiple SWIG modules with TinyCLOS</H3>
<H3><a name="Chicken_nn15"></a>19.4.3 Linking multiple SWIG modules with TinyCLOS</H3>
<p>Linking together multiple modules that share type information using the <code>%import</code>
@ -465,7 +465,7 @@ with <code>(declare (uses ...))</code>.
To create an extension library or an egg, just create a <tt>module_load.scm</tt> file that <code>(declare (uses ...))</code>
all the modules.</p>
<H2><a name="Chicken_nn16"></a>17.5 Typemaps</H2>
<H2><a name="Chicken_nn16"></a>19.5 Typemaps</H2>
<p>
@ -474,7 +474,7 @@ all the modules.</p>
<code>Lib/chicken/chicken.swg</code>.
</p>
<H2><a name="Chicken_nn17"></a>17.6 Pointers</H2>
<H2><a name="Chicken_nn17"></a>19.6 Pointers</H2>
<p>
@ -507,7 +507,7 @@ all the modules.</p>
type. flags is either zero or SWIG_POINTER_DISOWN (see below).
</p>
<H3><a name="collection"></a>17.6.1 Garbage collection</H3>
<H3><a name="collection"></a>19.6.1 Garbage collection</H3>
<p>If the owner flag passed to <code>SWIG_NewPointerObj</code> is 1, <code>NewPointerObj</code> will add a
@ -538,7 +538,7 @@ all the modules.</p>
must be called manually.
</p>
<H2><a name="Chicken_nn18"></a>17.7 Unsupported features and known problems</H2>
<H2><a name="Chicken_nn18"></a>19.7 Unsupported features and known problems</H2>
<ul>