Update after running html tools in makefile
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6139 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8dfc876eea
commit
229d40e0ee
11 changed files with 339 additions and 331 deletions
|
|
@ -5,7 +5,7 @@
|
|||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
<H1><a name="Pike"></a>24 SWIG and Pike</H1>
|
||||
<H1><a name="Pike"></a>25 SWIG and Pike</H1>
|
||||
<!-- INDEX -->
|
||||
<ul>
|
||||
<li><a href="#Pike_nn2">Preliminaries</a>
|
||||
|
|
@ -43,10 +43,10 @@ least, make sure you read the "<a href="SWIG.html#SWIG">SWIG Basics</a>"
|
|||
chapter.<br>
|
||||
</p>
|
||||
|
||||
<H2><a name="Pike_nn2"></a>24.1 Preliminaries</H2>
|
||||
<H2><a name="Pike_nn2"></a>25.1 Preliminaries</H2>
|
||||
|
||||
|
||||
<H3><a name="Pike_nn3"></a>24.1.1 Running SWIG</H3>
|
||||
<H3><a name="Pike_nn3"></a>25.1.1 Running SWIG</H3>
|
||||
|
||||
|
||||
Suppose that you defined a SWIG module such as the following:
|
||||
|
|
@ -80,7 +80,7 @@ can use the <tt>-o</tt> option:
|
|||
<blockquote>
|
||||
<pre>$ <b>swig -pike -o pseudonym.c example.i</b><br></pre>
|
||||
</blockquote>
|
||||
<H3><a name="Pike_nn4"></a>24.1.2 Getting the right header files</H3>
|
||||
<H3><a name="Pike_nn4"></a>25.1.2 Getting the right header files</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -100,7 +100,7 @@ You're looking for files with the names <tt>global.h</tt>, <tt>program.h</tt>
|
|||
and so on.
|
||||
</p>
|
||||
|
||||
<H3><a name="Pike_nn5"></a>24.1.3 Using your module</H3>
|
||||
<H3><a name="Pike_nn5"></a>25.1.3 Using your module</H3>
|
||||
|
||||
|
||||
To use your module, simply use Pike's <tt>import</tt> statement:
|
||||
|
|
@ -113,10 +113,10 @@ Pike v7.4 release 10 running Hilfe v3.5 (Incremental Pike Frontend)
|
|||
(1) Result: 24
|
||||
</pre></blockquote>
|
||||
|
||||
<H2><a name="Pike_nn6"></a>24.2 Basic C/C++ Mapping</H2>
|
||||
<H2><a name="Pike_nn6"></a>25.2 Basic C/C++ Mapping</H2>
|
||||
|
||||
|
||||
<H3><a name="Pike_nn7"></a>24.2.1 Modules</H3>
|
||||
<H3><a name="Pike_nn7"></a>25.2.1 Modules</H3>
|
||||
|
||||
|
||||
All of the code for a given SWIG module is wrapped into a single Pike
|
||||
|
|
@ -125,7 +125,7 @@ module ultimately determines the module's name (as far as Pike is
|
|||
concerned), SWIG's <tt>%module</tt> directive doesn't really have any
|
||||
significance.
|
||||
|
||||
<H3><a name="Pike_nn8"></a>24.2.2 Functions</H3>
|
||||
<H3><a name="Pike_nn8"></a>25.2.2 Functions</H3>
|
||||
|
||||
|
||||
Global functions are wrapped as new Pike built-in functions. For
|
||||
|
|
@ -146,7 +146,7 @@ exactly as you'd expect it to:
|
|||
(1) Result: 24
|
||||
</pre></blockquote>
|
||||
|
||||
<H3><a name="Pike_nn9"></a>24.2.3 Global variables</H3>
|
||||
<H3><a name="Pike_nn9"></a>25.2.3 Global variables</H3>
|
||||
|
||||
|
||||
Global variables are currently wrapped as a pair of of functions, one to get
|
||||
|
|
@ -171,19 +171,19 @@ will result in two functions, <tt>Foo_get()</tt> and <tt>Foo_set()</tt>:
|
|||
(3) Result: 3.141590
|
||||
</pre></blockquote>
|
||||
|
||||
<H3><a name="Pike_nn10"></a>24.2.4 Constants and enumerated types</H3>
|
||||
<H3><a name="Pike_nn10"></a>25.2.4 Constants and enumerated types</H3>
|
||||
|
||||
|
||||
Enumerated types in C/C++ declarations are wrapped as Pike constants,
|
||||
not as Pike enums.
|
||||
|
||||
<H3><a name="Pike_nn11"></a>24.2.5 Constructors and Destructors</H3>
|
||||
<H3><a name="Pike_nn11"></a>25.2.5 Constructors and Destructors</H3>
|
||||
|
||||
|
||||
Constructors are wrapped as <tt>create()</tt> methods, and destructors are
|
||||
wrapped as <tt>destroy()</tt> methods, for Pike classes.
|
||||
|
||||
<H3><a name="Pike_nn12"></a>24.2.6 Static Members</H3>
|
||||
<H3><a name="Pike_nn12"></a>25.2.6 Static Members</H3>
|
||||
|
||||
|
||||
Since Pike doesn't support static methods or data for Pike classes, static
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue