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:
parent
f666c7e749
commit
f7ebb5809b
22 changed files with 3703 additions and 882 deletions
|
|
@ -6,7 +6,7 @@
|
|||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
<H1><a name="Python"></a>26 SWIG and Python</H1>
|
||||
<H1><a name="Python"></a>28 SWIG and Python</H1>
|
||||
<!-- INDEX -->
|
||||
<div class="sectiontoc">
|
||||
<ul>
|
||||
|
|
@ -126,7 +126,7 @@ very least, make sure you read the "<a href="SWIG.html#SWIG">SWIG
|
|||
Basics</a>" chapter.
|
||||
</p>
|
||||
|
||||
<H2><a name="Python_nn2"></a>26.1 Overview</H2>
|
||||
<H2><a name="Python_nn2"></a>28.1 Overview</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -153,10 +153,10 @@ described followed by a discussion of low-level implementation
|
|||
details.
|
||||
</p>
|
||||
|
||||
<H2><a name="Python_nn3"></a>26.2 Preliminaries</H2>
|
||||
<H2><a name="Python_nn3"></a>28.2 Preliminaries</H2>
|
||||
|
||||
|
||||
<H3><a name="Python_nn4"></a>26.2.1 Running SWIG</H3>
|
||||
<H3><a name="Python_nn4"></a>28.2.1 Running SWIG</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -205,7 +205,7 @@ from the module name specified with <tt>%module</tt>. If the module name is <tt
|
|||
a file <tt>example.py</tt> is created.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn5"></a>26.2.2 Getting the right header files</H3>
|
||||
<H3><a name="Python_nn5"></a>28.2.2 Getting the right header files</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -236,7 +236,7 @@ Type "copyright", "credits" or "license" for more information.
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<H3><a name="Python_nn6"></a>26.2.3 Compiling a dynamic module</H3>
|
||||
<H3><a name="Python_nn6"></a>28.2.3 Compiling a dynamic module</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -282,10 +282,10 @@ module actually consists of two files; <tt>socket.py</tt> and
|
|||
<tt>_socket.so</tt>. Many other built-in Python modules follow a similar convention.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn7"></a>26.2.4 Using distutils</H3>
|
||||
<H3><a name="Python_nn7"></a>28.2.4 Using distutils</H3>
|
||||
|
||||
|
||||
<H3><a name="Python_nn8"></a>26.2.5 Static linking</H3>
|
||||
<H3><a name="Python_nn8"></a>28.2.5 Static linking</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -364,7 +364,7 @@ If using static linking, you might want to rely on a different approach
|
|||
(perhaps using distutils).
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn9"></a>26.2.6 Using your module</H3>
|
||||
<H3><a name="Python_nn9"></a>28.2.6 Using your module</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -521,7 +521,7 @@ system configuration (this requires root access and you will need to
|
|||
read the man pages).
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn10"></a>26.2.7 Compilation of C++ extensions</H3>
|
||||
<H3><a name="Python_nn10"></a>28.2.7 Compilation of C++ extensions</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -618,7 +618,7 @@ erratic program behavior. If working with lots of software components, you
|
|||
might want to investigate using a more formal standard such as COM.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn11"></a>26.2.8 Compiling for 64-bit platforms</H3>
|
||||
<H3><a name="Python_nn11"></a>28.2.8 Compiling for 64-bit platforms</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -655,7 +655,7 @@ and -m64 allow you to choose the desired binary format for your python
|
|||
extension.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn12"></a>26.2.9 Building Python Extensions under Windows</H3>
|
||||
<H3><a name="Python_nn12"></a>28.2.9 Building Python Extensions under Windows</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -744,7 +744,7 @@ you may want to consult the <a href="http://swig.cs.uchicago.edu/cgi-bin/wiki.pl
|
|||
SWIG Wiki</a>.
|
||||
</p>
|
||||
|
||||
<H2><a name="Python_nn13"></a>26.3 A tour of basic C/C++ wrapping</H2>
|
||||
<H2><a name="Python_nn13"></a>28.3 A tour of basic C/C++ wrapping</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -753,7 +753,7 @@ to your C/C++ code. Functions are wrapped as functions, classes are wrapped as
|
|||
This section briefly covers the essential aspects of this wrapping.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn14"></a>26.3.1 Modules</H3>
|
||||
<H3><a name="Python_nn14"></a>28.3.1 Modules</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -766,7 +766,7 @@ module name, make sure you don't use the same name as a built-in
|
|||
Python command or standard module name.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn15"></a>26.3.2 Functions</H3>
|
||||
<H3><a name="Python_nn15"></a>28.3.2 Functions</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -790,7 +790,7 @@ like you think it does:
|
|||
>>>
|
||||
</pre></div>
|
||||
|
||||
<H3><a name="Python_nn16"></a>26.3.3 Global variables</H3>
|
||||
<H3><a name="Python_nn16"></a>28.3.3 Global variables</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -928,7 +928,7 @@ that starts with a leading underscore. SWIG does not create <tt>cvar</tt>
|
|||
if there are no global variables in a module.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn17"></a>26.3.4 Constants and enums</H3>
|
||||
<H3><a name="Python_nn17"></a>28.3.4 Constants and enums</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -968,7 +968,7 @@ other object. Unfortunately, there is no easy way for SWIG to
|
|||
generate code that prevents this. You will just have to be careful.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn18"></a>26.3.5 Pointers</H3>
|
||||
<H3><a name="Python_nn18"></a>28.3.5 Pointers</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1109,7 +1109,7 @@ C-style cast may return a bogus result whereas as the C++-style cast will return
|
|||
<tt>None</tt> if the conversion can't be performed.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn19"></a>26.3.6 Structures</H3>
|
||||
<H3><a name="Python_nn19"></a>28.3.6 Structures</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1298,7 +1298,7 @@ everything works just like you would expect. For example:
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<H3><a name="Python_nn20"></a>26.3.7 C++ classes</H3>
|
||||
<H3><a name="Python_nn20"></a>28.3.7 C++ classes</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1387,7 +1387,7 @@ they are accessed through <tt>cvar</tt> like this:
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<H3><a name="Python_nn21"></a>26.3.8 C++ inheritance</H3>
|
||||
<H3><a name="Python_nn21"></a>28.3.8 C++ inheritance</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1442,7 +1442,7 @@ then the function <tt>spam()</tt> accepts <tt>Foo *</tt> or a pointer to any cla
|
|||
It is safe to use multiple inheritance with SWIG.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn22"></a>26.3.9 Pointers, references, values, and arrays</H3>
|
||||
<H3><a name="Python_nn22"></a>28.3.9 Pointers, references, values, and arrays</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1503,7 +1503,7 @@ treated as a returning value, and it will follow the same
|
|||
allocation/deallocation process.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn23"></a>26.3.10 C++ overloaded functions</H3>
|
||||
<H3><a name="Python_nn23"></a>28.3.10 C++ overloaded functions</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1626,7 +1626,7 @@ first declaration takes precedence.
|
|||
Please refer to the "SWIG and C++" chapter for more information about overloading.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn24"></a>26.3.11 C++ operators</H3>
|
||||
<H3><a name="Python_nn24"></a>28.3.11 C++ operators</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1715,7 +1715,7 @@ Also, be aware that certain operators don't map cleanly to Python. For instance
|
|||
overloaded assignment operators don't map to Python semantics and will be ignored.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn25"></a>26.3.12 C++ namespaces</H3>
|
||||
<H3><a name="Python_nn25"></a>28.3.12 C++ namespaces</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1782,7 +1782,7 @@ utilizes thousands of small deeply nested namespaces each with
|
|||
identical symbol names, well, then you get what you deserve.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn26"></a>26.3.13 C++ templates</H3>
|
||||
<H3><a name="Python_nn26"></a>28.3.13 C++ templates</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1835,7 +1835,7 @@ More details can be found in the <a href="SWIGPlus.html#SWIGPlus">SWIG and C++</
|
|||
examples will appear later.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn27"></a>26.3.14 C++ Smart Pointers</H3>
|
||||
<H3><a name="Python_nn27"></a>28.3.14 C++ Smart Pointers</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1920,7 +1920,7 @@ simply use the <tt>__deref__()</tt> method. For example:
|
|||
</div>
|
||||
|
||||
|
||||
<H3><a name="Python_nn27a"></a>26.3.15 C++ Reference Counted Objects (ref/unref)</H3>
|
||||
<H3><a name="Python_nn27a"></a>28.3.15 C++ Reference Counted Objects (ref/unref)</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2062,7 +2062,7 @@ python releases the shadow instance.
|
|||
</p>
|
||||
|
||||
|
||||
<H2><a name="Python_nn28"></a>26.4 Further details on the Python class interface</H2>
|
||||
<H2><a name="Python_nn28"></a>28.4 Further details on the Python class interface</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2075,7 +2075,7 @@ of low-level details were omitted. This section provides a brief overview
|
|||
of how the proxy classes work.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn29"></a>26.4.1 Proxy classes</H3>
|
||||
<H3><a name="Python_nn29"></a>28.4.1 Proxy classes</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2164,7 +2164,7 @@ you can attach new Python methods to the class and you can even inherit from it
|
|||
by Python built-in types until Python 2.2).
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn30"></a>26.4.2 Memory management</H3>
|
||||
<H3><a name="Python_nn30"></a>28.4.2 Memory management</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2351,7 +2351,7 @@ It is also possible to deal with situations like this using
|
|||
typemaps--an advanced topic discussed later.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn31"></a>26.4.3 Python 2.2 and classic classes</H3>
|
||||
<H3><a name="Python_nn31"></a>28.4.3 Python 2.2 and classic classes</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2388,7 +2388,7 @@ class itself. In Python-2.1 and earlier, they have to be accessed as a global
|
|||
function or through an instance (see the earlier section).
|
||||
</p>
|
||||
|
||||
<H2><a name="directors"></a>26.5 Cross language polymorphism</H2>
|
||||
<H2><a name="directors"></a>28.5 Cross language polymorphism</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2422,7 +2422,7 @@ proxy classes, director classes, and C wrapper functions takes care of
|
|||
all the cross-language method routing transparently.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn33"></a>26.5.1 Enabling directors</H3>
|
||||
<H3><a name="Python_nn33"></a>28.5.1 Enabling directors</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2515,7 +2515,7 @@ class MyFoo(mymodule.Foo):
|
|||
</div>
|
||||
|
||||
|
||||
<H3><a name="Python_nn34"></a>26.5.2 Director classes</H3>
|
||||
<H3><a name="Python_nn34"></a>28.5.2 Director classes</H3>
|
||||
|
||||
|
||||
|
||||
|
|
@ -2597,7 +2597,7 @@ so there is no need for the extra overhead involved with routing the
|
|||
calls through Python.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn35"></a>26.5.3 Ownership and object destruction</H3>
|
||||
<H3><a name="Python_nn35"></a>28.5.3 Ownership and object destruction</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2664,7 +2664,7 @@ deleting all the Foo pointers it contains at some point. Note that no hard
|
|||
references to the Foo objects remain in Python.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn36"></a>26.5.4 Exception unrolling</H3>
|
||||
<H3><a name="Python_nn36"></a>28.5.4 Exception unrolling</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2723,7 +2723,7 @@ Swig::DirectorMethodException is thrown, Python will register the
|
|||
exception as soon as the C wrapper function returns.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn37"></a>26.5.5 Overhead and code bloat</H3>
|
||||
<H3><a name="Python_nn37"></a>28.5.5 Overhead and code bloat</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2757,7 +2757,7 @@ directive) for only those methods that are likely to be extended in
|
|||
Python.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn38"></a>26.5.6 Typemaps</H3>
|
||||
<H3><a name="Python_nn38"></a>28.5.6 Typemaps</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2771,7 +2771,7 @@ need to be supported.
|
|||
</p>
|
||||
|
||||
|
||||
<H3><a name="Python_nn39"></a>26.5.7 Miscellaneous</H3>
|
||||
<H3><a name="Python_nn39"></a>28.5.7 Miscellaneous</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2818,7 +2818,7 @@ methods that return const references.
|
|||
</p>
|
||||
|
||||
|
||||
<H2><a name="Python_nn40"></a>26.6 Common customization features</H2>
|
||||
<H2><a name="Python_nn40"></a>28.6 Common customization features</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2831,7 +2831,7 @@ This section describes some common SWIG features that are used to
|
|||
improve your the interface to an extension module.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn41"></a>26.6.1 C/C++ helper functions</H3>
|
||||
<H3><a name="Python_nn41"></a>28.6.1 C/C++ helper functions</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2912,7 +2912,7 @@ hard to implement. It is possible to clean this up using Python code, typemaps,
|
|||
customization features as covered in later sections.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn42"></a>26.6.2 Adding additional Python code</H3>
|
||||
<H3><a name="Python_nn42"></a>28.6.2 Adding additional Python code</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2966,7 +2966,7 @@ what can be done without having to rely on any of the more advanced
|
|||
customization features.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn43"></a>26.6.3 Class extension with %extend</H3>
|
||||
<H3><a name="Python_nn43"></a>28.6.3 Class extension with %extend</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3055,7 +3055,7 @@ Vector(12,14,16)
|
|||
in any way---the extensions only show up in the Python interface.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn44"></a>26.6.4 Exception handling with %exception</H3>
|
||||
<H3><a name="Python_nn44"></a>28.6.4 Exception handling with %exception</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3181,7 +3181,7 @@ The language-independent <tt>exception.i</tt> library file can also be used
|
|||
to raise exceptions. See the <a href="Library.html#Library">SWIG Library</a> chapter.
|
||||
</p>
|
||||
|
||||
<H2><a name="Python_nn45"></a>26.7 Tips and techniques</H2>
|
||||
<H2><a name="Python_nn45"></a>28.7 Tips and techniques</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3191,7 +3191,7 @@ strings, binary data, and arrays. This chapter discusses the common techniques
|
|||
solving these problems.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn46"></a>26.7.1 Input and output parameters</H3>
|
||||
<H3><a name="Python_nn46"></a>28.7.1 Input and output parameters</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3404,7 +3404,7 @@ void foo(Bar *OUTPUT);
|
|||
may not have the intended effect since <tt>typemaps.i</tt> does not define an OUTPUT rule for <tt>Bar</tt>.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn47"></a>26.7.2 Simple pointers</H3>
|
||||
<H3><a name="Python_nn47"></a>28.7.2 Simple pointers</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3473,7 +3473,7 @@ If you replace <tt>%pointer_functions()</tt> by <tt>%pointer_class(type,name)</t
|
|||
See the <a href="Library.html#Library">SWIG Library</a> chapter for further details.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn48"></a>26.7.3 Unbounded C Arrays</H3>
|
||||
<H3><a name="Python_nn48"></a>28.7.3 Unbounded C Arrays</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3535,7 +3535,7 @@ well suited for applications in which you need to create buffers,
|
|||
package binary data, etc.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn49"></a>26.7.4 String handling</H3>
|
||||
<H3><a name="Python_nn49"></a>28.7.4 String handling</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3604,16 +3604,16 @@ If you need to return binary data, you might use the
|
|||
also be used to extra binary data from arbitrary pointers.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn50"></a>26.7.5 Arrays</H3>
|
||||
<H3><a name="Python_nn50"></a>28.7.5 Arrays</H3>
|
||||
|
||||
|
||||
<H3><a name="Python_nn51"></a>26.7.6 String arrays</H3>
|
||||
<H3><a name="Python_nn51"></a>28.7.6 String arrays</H3>
|
||||
|
||||
|
||||
<H3><a name="Python_nn52"></a>26.7.7 STL wrappers</H3>
|
||||
<H3><a name="Python_nn52"></a>28.7.7 STL wrappers</H3>
|
||||
|
||||
|
||||
<H2><a name="Python_nn53"></a>26.8 Typemaps</H2>
|
||||
<H2><a name="Python_nn53"></a>28.8 Typemaps</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3630,7 +3630,7 @@ Typemaps are only used if you want to change some aspect of the primitive
|
|||
C-Python interface or if you want to elevate your guru status.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn54"></a>26.8.1 What is a typemap?</H3>
|
||||
<H3><a name="Python_nn54"></a>28.8.1 What is a typemap?</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3746,7 +3746,7 @@ parameter is omitted):
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<H3><a name="Python_nn55"></a>26.8.2 Python typemaps</H3>
|
||||
<H3><a name="Python_nn55"></a>28.8.2 Python typemaps</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3787,7 +3787,7 @@ a look at the SWIG library version 1.3.20 or so.
|
|||
</p>
|
||||
|
||||
|
||||
<H3><a name="Python_nn56"></a>26.8.3 Typemap variables</H3>
|
||||
<H3><a name="Python_nn56"></a>28.8.3 Typemap variables</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3858,7 +3858,7 @@ properly assigned.
|
|||
The Python name of the wrapper function being created.
|
||||
</div>
|
||||
|
||||
<H3><a name="Python_nn57"></a>26.8.4 Useful Python Functions</H3>
|
||||
<H3><a name="Python_nn57"></a>28.8.4 Useful Python Functions</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3972,7 +3972,7 @@ write me
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<H2><a name="Python_nn58"></a>26.9 Typemap Examples</H2>
|
||||
<H2><a name="Python_nn58"></a>28.9 Typemap Examples</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -3981,7 +3981,7 @@ might look at the files "<tt>python.swg</tt>" and "<tt>typemaps.i</tt>" in
|
|||
the SWIG library.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn59"></a>26.9.1 Converting Python list to a char ** </H3>
|
||||
<H3><a name="Python_nn59"></a>28.9.1 Converting Python list to a char ** </H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4061,7 +4061,7 @@ memory allocation is used to allocate memory for the array, the
|
|||
the C function.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn60"></a>26.9.2 Expanding a Python object into multiple arguments</H3>
|
||||
<H3><a name="Python_nn60"></a>28.9.2 Expanding a Python object into multiple arguments</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4140,7 +4140,7 @@ to supply the argument count. This is automatically set by the typemap code. F
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<H3><a name="Python_nn61"></a>26.9.3 Using typemaps to return arguments</H3>
|
||||
<H3><a name="Python_nn61"></a>28.9.3 Using typemaps to return arguments</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4229,7 +4229,7 @@ function can now be used as follows:
|
|||
>>>
|
||||
</pre></div>
|
||||
|
||||
<H3><a name="Python_nn62"></a>26.9.4 Mapping Python tuples into small arrays</H3>
|
||||
<H3><a name="Python_nn62"></a>28.9.4 Mapping Python tuples into small arrays</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4278,7 +4278,7 @@ array, such an approach would not be recommended for huge arrays, but
|
|||
for small structures, this approach works fine.
|
||||
</p>
|
||||
|
||||
<H3><a name="Python_nn63"></a>26.9.5 Mapping sequences to C arrays</H3>
|
||||
<H3><a name="Python_nn63"></a>28.9.5 Mapping sequences to C arrays</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4363,7 +4363,7 @@ static int convert_darray(PyObject *input, double *ptr, int size) {
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<H3><a name="Python_nn64"></a>26.9.6 Pointer handling</H3>
|
||||
<H3><a name="Python_nn64"></a>28.9.6 Pointer handling</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4458,7 +4458,7 @@ class object (if applicable).
|
|||
|
||||
|
||||
|
||||
<H2><a name="Python_nn65"></a>26.10 Docstring Features</H2>
|
||||
<H2><a name="Python_nn65"></a>28.10 Docstring Features</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4486,7 +4486,7 @@ of your users much simpler.
|
|||
</p>
|
||||
|
||||
|
||||
<H3><a name="Python_nn66"></a>26.10.1 Module docstring</H3>
|
||||
<H3><a name="Python_nn66"></a>28.10.1 Module docstring</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4520,7 +4520,7 @@ layout of controls on a panel, etc. to be loaded from an XML file."
|
|||
</div>
|
||||
|
||||
|
||||
<H3><a name="Python_nn67"></a>26.10.2 %feature("autodoc")</H3>
|
||||
<H3><a name="Python_nn67"></a>28.10.2 %feature("autodoc")</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4547,7 +4547,7 @@ names, default values if any, and return type if any. There are also
|
|||
three options for autodoc controlled by the value given to the
|
||||
feature, described below.
|
||||
|
||||
<H4><a name="Python_nn68"></a>26.10.2.1 %feature("autodoc", "0")</H4>
|
||||
<H4><a name="Python_nn68"></a>28.10.2.1 %feature("autodoc", "0")</H4>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4576,7 +4576,7 @@ def function_name(*args, **kwargs):
|
|||
</div>
|
||||
|
||||
|
||||
<H4><a name="Python_nn69"></a>26.10.2.2 %feature("autodoc", "1")</H4>
|
||||
<H4><a name="Python_nn69"></a>28.10.2.2 %feature("autodoc", "1")</H4>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4601,7 +4601,7 @@ def function_name(*args, **kwargs):
|
|||
|
||||
|
||||
|
||||
<H4><a name="Python_nn70"></a>26.10.2.3 %feature("autodoc", "docstring")</H4>
|
||||
<H4><a name="Python_nn70"></a>28.10.2.3 %feature("autodoc", "docstring")</H4>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4620,7 +4620,7 @@ void GetPosition(int* OUTPUT, int* OUTPUT);
|
|||
</div>
|
||||
|
||||
|
||||
<H3><a name="Python_nn71"></a>26.10.3 %feature("docstring")</H3>
|
||||
<H3><a name="Python_nn71"></a>28.10.3 %feature("docstring")</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -4652,7 +4652,7 @@ with more than one line.
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<H2><a name="Python_nn72"></a>26.11 Python Packages</H2>
|
||||
<H2><a name="Python_nn72"></a>28.11 Python Packages</H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue