add new %begin directive for inserting code at top of wrapper file
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11133 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a1933f7bbc
commit
efa11dee52
31 changed files with 334 additions and 162 deletions
|
|
@ -2737,11 +2737,16 @@ the module upon loading.
|
|||
|
||||
<p>
|
||||
Code is inserted into the appropriate code section by using one
|
||||
of the following code insertion directives:
|
||||
of the code insertion directives listed below. The order of the sections in
|
||||
the wrapper file is as shown:
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%begin %{
|
||||
... code in begin section ...
|
||||
%}
|
||||
|
||||
%runtime %{
|
||||
... code in runtime section ...
|
||||
%}
|
||||
|
|
@ -2762,10 +2767,12 @@ of the following code insertion directives:
|
|||
|
||||
<p>
|
||||
The bare <tt>%{ ... %}</tt> directive is a shortcut that is the same as
|
||||
<tt>%header %{ ... %}</tt>.
|
||||
<tt>%header %{ ... %}</tt>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The <tt>%begin</tt> section is empty by default
|
||||
and is provided as a way for users to insert code at the top of the wrapper file.
|
||||
Everything in a code insertion block is copied verbatim into the output file and is
|
||||
not parsed by SWIG. Most SWIG input files have at least one such block to include header
|
||||
files and support C code. Additional code blocks may be placed anywhere in a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue