git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9666 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e90a095e77
commit
85a3666f7c
4 changed files with 60 additions and 14 deletions
|
|
@ -823,13 +823,14 @@
|
|||
<li><a href="Lisp.html#Lisp_nn4">Additional Commandline Options </a>
|
||||
<li><a href="Lisp.html#Lisp_nn5">Generating CFFI bindings</a>
|
||||
<li><a href="Lisp.html#Lisp_nn6">Generating CFFI bindings for C++ code</a>
|
||||
<li><a href="Lisp.html#Lisp_nn7">Inserting user code into generated files</a></li>
|
||||
</ul>
|
||||
<li><a href="Lisp.html#Lisp_nn7">CLISP</a>
|
||||
<li><a href="Lisp.html#Lisp_nn8">CLISP</a>
|
||||
<ul>
|
||||
<li><a href="Lisp.html#Lisp_nn8">Additional Commandline Options </a>
|
||||
<li><a href="Lisp.html#Lisp_nn9">Details on CLISP bindings</a>
|
||||
<li><a href="Lisp.html#Lisp_nn9">Additional Commandline Options </a>
|
||||
<li><a href="Lisp.html#Lisp_nn10">Details on CLISP bindings</a>
|
||||
</ul>
|
||||
<li><a href="Lisp.html#Lisp_nn10">UFFI </a>
|
||||
<li><a href="Lisp.html#Lisp_nn11">UFFI </a>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- INDEX -->
|
||||
|
|
|
|||
|
|
@ -16,13 +16,14 @@
|
|||
<li><a href="#Lisp_nn4">Additional Commandline Options </a>
|
||||
<li><a href="#Lisp_nn5">Generating CFFI bindings</a>
|
||||
<li><a href="#Lisp_nn6">Generating CFFI bindings for C++ code</a>
|
||||
<li><a href="#Lisp_nn7">Inserting user code into generated files</a></li>
|
||||
</ul>
|
||||
<li><a href="#Lisp_nn7">CLISP</a>
|
||||
<li><a href="#Lisp_nn8">CLISP</a>
|
||||
<ul>
|
||||
<li><a href="#Lisp_nn8">Additional Commandline Options </a>
|
||||
<li><a href="#Lisp_nn9">Details on CLISP bindings</a>
|
||||
<li><a href="#Lisp_nn9">Additional Commandline Options </a>
|
||||
<li><a href="#Lisp_nn10">Details on CLISP bindings</a>
|
||||
</ul>
|
||||
<li><a href="#Lisp_nn10">UFFI </a>
|
||||
<li><a href="#Lisp_nn11">UFFI </a>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- INDEX -->
|
||||
|
|
@ -567,7 +568,46 @@ If you have any questions, suggestions, patches, etc., related to CFFI
|
|||
module feel free to contact us on the SWIG mailing list, and
|
||||
also please add a "[CFFI]" tag in the subject line.
|
||||
|
||||
<H2><a name="Lisp_nn7"></a>21.3 CLISP</H2>
|
||||
<H3><a name="Lisp_nn7"></a>21.2.4 Inserting user code into generated files</H3>
|
||||
|
||||
<p>
|
||||
It is often necessary to <a href="SWIG.html#SWIG_nn40">include user-defined code</a>
|
||||
into the automatically generated interface files. For example, when building
|
||||
a C++ interface, example_wrap.cxx will likely not compile unless
|
||||
you add a <tt>#include "header.h"</tt> directive. This can be done
|
||||
using the SWIG <tt>%insert(section) %{ ...code... %}</tt> directive:
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%module example
|
||||
|
||||
%insert("runtime") %{
|
||||
#include "header.h"
|
||||
%}
|
||||
|
||||
%include "header.h"
|
||||
|
||||
int fact(int n);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Additional sections have been added for inserting into the
|
||||
generated lisp interface file:
|
||||
</p>
|
||||
<ul>
|
||||
<li><tt>lisphead</tt> - inserts before type declarations</li>
|
||||
<li><tt>swiglisp</tt> - inserts after type declarations according to
|
||||
where it appears in the .i file</li>
|
||||
</ul>
|
||||
<p>
|
||||
Note that the block <tt>%{ ... %}</tt> is effectively a shortcut for
|
||||
<tt>%insert("runtime") %{ ... %}</tt>.
|
||||
</p>
|
||||
|
||||
|
||||
<H2><a name="Lisp_nn8"></a>21.3 CLISP</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -597,7 +637,7 @@ swig -clisp -module <i>module-name</i> <i>file-name</i>
|
|||
interface file for the CLISP module. The CLISP module tries to
|
||||
produce code which is both human readable and easily modifyable.
|
||||
</p>
|
||||
<H3><a name="Lisp_nn8"></a>21.3.1 Additional Commandline Options </H3>
|
||||
<H3><a name="Lisp_nn9"></a>21.3.1 Additional Commandline Options </H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -630,7 +670,7 @@ and global variables will be created otherwise only definitions for<br/>
|
|||
|
||||
</table>
|
||||
|
||||
<H3><a name="Lisp_nn9"></a>21.3.2 Details on CLISP bindings</H3>
|
||||
<H3><a name="Lisp_nn10"></a>21.3.2 Details on CLISP bindings</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -754,7 +794,7 @@ struct bar {
|
|||
|
||||
</pre></div>
|
||||
|
||||
<H2><a name="Lisp_nn10"></a>21.4 UFFI </H2>
|
||||
<H2><a name="Lisp_nn11"></a>21.4 UFFI </H2>
|
||||
|
||||
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue