aboutsummaryrefslogtreecommitdiff
path: root/Doc/Manual
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2012-04-28 15:30:19 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2012-04-28 15:30:19 +0000
commit88fa6327151ca8da00ea6d308e92282078e80af9 (patch)
tree6a15ebf897e2ec40355d293a605e13cf290140c4 /Doc/Manual
parenta0e21e82ca112624ed2ab588424dec022e1e6a5a (diff)
downloadswig-88fa6327151ca8da00ea6d308e92282078e80af9.tar.gz
Fix %fragment error in docs and improve preprocessing and delimiters section - SF bug 3519394
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13022 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Doc/Manual')
-rw-r--r--Doc/Manual/Preprocessor.html10
-rw-r--r--Doc/Manual/Typemaps.html10
2 files changed, 15 insertions, 5 deletions
diff --git a/Doc/Manual/Preprocessor.html b/Doc/Manual/Preprocessor.html
index 8d41efccf..332d2a576 100644
--- a/Doc/Manual/Preprocessor.html
+++ b/Doc/Manual/Preprocessor.html
@@ -306,7 +306,13 @@ interface building. However, they are used internally to implement a number of
SWIG directives and are provided to make SWIG more compatible with C99 code.
</p>
-<H2><a name="Preprocessor_nn8"></a>7.7 Preprocessing and %{ ... %} &amp; " ... " delimiters</H2>
+<H2><a name="Preprocessor_delimiters"></a>7.7 Preprocessing and delimiters</H2>
+
+<p>
+The preprocessor handles { }, " " and %{ %} delimiters differently.
+</p>
+
+<H3><a name="Preprocessor_nn8"></a>7.7 Preprocessing and %{ ... %} &amp; " ... " delimiters</H3>
<p>
@@ -331,7 +337,7 @@ the contents of the <tt>%{ ... %}</tt> block are copied without
modification to the output (including all preprocessor directives).
</p>
-<H2><a name="Preprocessor_nn9"></a>7.8 Preprocessing and { ... } delimiters</H2>
+<H3><a name="Preprocessor_nn9"></a>7.8 Preprocessing and { ... } delimiters</H3>
<p>
diff --git a/Doc/Manual/Typemaps.html b/Doc/Manual/Typemaps.html
index b6e8cf3ce..b3b0bc7a9 100644
--- a/Doc/Manual/Typemaps.html
+++ b/Doc/Manual/Typemaps.html
@@ -3673,17 +3673,21 @@ generated into the wrapper code before any typemap code that calls it.
<p>
To define a fragment you need a fragment name, a section name for generating the fragment code into, and the code itself.
See <a href="SWIG.html#SWIG_nn42">Code insertion blocks</a> for a full list of section names.
-Usually the section name used is "header". Both string and curly braces can be used:
+Usually the section name used is "header". Different delimiters can be used:
</p>
<div class="code">
<pre>
+%fragment("my_name", "header") %{ ... %}
%fragment("my_name", "header") { ... }
%fragment("my_name", "header") " ... "
</pre>
</div>
<p>
+and these follow the usual preprocessing rules mentioned in the
+<a href="Preprocessor.html#Preprocessor_delimiters">Preprocessing delimiters</a>
+section.
The following are some rules and guidelines for using fragments:
</p>
@@ -3761,8 +3765,8 @@ A fragment can use one or more additional fragments, for example:
<div class="code">
<pre>
-%fragment("&lt;limits.h&gt;", "header") {
- #include &lt;limits.h&gt;
+%fragment("&lt;limits.h&gt;", "header") {
+ %#include &lt;limits.h&gt;
}