Minor comment changes and html changes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12181 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-07-23 19:34:17 +00:00
commit af96789c14
4 changed files with 25 additions and 9 deletions

View file

@ -20,6 +20,8 @@ Version 2.0.1 (in progress)
adjust your regular expressions syntax as the new regex encoder uses adjust your regular expressions syntax as the new regex encoder uses
Perl-compatible syntax and not (extended) POSIX syntax as the old one. Perl-compatible syntax and not (extended) POSIX syntax as the old one.
*** POTENTIAL INCOMPATIBILITY ***
2010-07-13: vadz 2010-07-13: vadz
Add "regexmatch", "regextarget" and "notregexmatch" which can be Add "regexmatch", "regextarget" and "notregexmatch" which can be
used to apply %rename directives to the declarations matching the used to apply %rename directives to the declarations matching the
@ -36,7 +38,7 @@ Version 2.0.1 (in progress)
lower case versions all declarations except those consisting from lower case versions all declarations except those consisting from
capital letters only: capital letters only:
%rename("$(lower)s", notregexmatch$name="^[A-Z]+$") ""; %rename("$(lowercase)s", notregexmatch$name="^[A-Z]+$") "";
2010-07-13: vadz 2010-07-13: vadz
Add the new "regex" encoder that can be used in %rename, e.g. Add the new "regex" encoder that can be used in %rename, e.g.

View file

@ -152,6 +152,11 @@
<li><a href="SWIG.html#SWIG_nn26">Arrays</a> <li><a href="SWIG.html#SWIG_nn26">Arrays</a>
<li><a href="SWIG.html#SWIG_readonly_variables">Creating read-only variables</a> <li><a href="SWIG.html#SWIG_readonly_variables">Creating read-only variables</a>
<li><a href="SWIG.html#SWIG_rename_ignore">Renaming and ignoring declarations</a> <li><a href="SWIG.html#SWIG_rename_ignore">Renaming and ignoring declarations</a>
<ul>
<li><a href="SWIG.html#SWIG_nn29">Simple renaming of specific identifiers</a>
<li><a href="SWIG.html#SWIG_advanced_renaming">Advanced renaming support</a>
<li><a href="SWIG.html#SWIG_limiting_renaming">Limiting global renaming rules</a>
</ul>
<li><a href="SWIG.html#SWIG_default_args">Default/optional arguments</a> <li><a href="SWIG.html#SWIG_default_args">Default/optional arguments</a>
<li><a href="SWIG.html#SWIG_nn30">Pointers to functions and callbacks</a> <li><a href="SWIG.html#SWIG_nn30">Pointers to functions and callbacks</a>
</ul> </ul>

View file

@ -44,6 +44,11 @@
<li><a href="#SWIG_nn26">Arrays</a> <li><a href="#SWIG_nn26">Arrays</a>
<li><a href="#SWIG_readonly_variables">Creating read-only variables</a> <li><a href="#SWIG_readonly_variables">Creating read-only variables</a>
<li><a href="#SWIG_rename_ignore">Renaming and ignoring declarations</a> <li><a href="#SWIG_rename_ignore">Renaming and ignoring declarations</a>
<ul>
<li><a href="#SWIG_nn29">Simple renaming of specific identifiers</a>
<li><a href="#SWIG_advanced_renaming">Advanced renaming support</a>
<li><a href="#SWIG_limiting_renaming">Limiting global renaming rules</a>
</ul>
<li><a href="#SWIG_default_args">Default/optional arguments</a> <li><a href="#SWIG_default_args">Default/optional arguments</a>
<li><a href="#SWIG_nn30">Pointers to functions and callbacks</a> <li><a href="#SWIG_nn30">Pointers to functions and callbacks</a>
</ul> </ul>
@ -1661,7 +1666,9 @@ generate a warning message. Simply change the directives to <tt>%immutable;</t
<H3><a name="SWIG_rename_ignore"></a>5.4.7 Renaming and ignoring declarations</H3> <H3><a name="SWIG_rename_ignore"></a>5.4.7 Renaming and ignoring declarations</H3>
<H4>5.4.7.1 Simple renaming of specific identifiers</H4>
<H4><a name="SWIG_nn29"></a>5.4.7.1 Simple renaming of specific identifiers</H4>
<p> <p>
Normally, the name of a C declaration is used when that declaration is Normally, the name of a C declaration is used when that declaration is
@ -1758,7 +1765,8 @@ This directive is still supported, but it is deprecated and should probably be a
directive is more powerful and better supports wrapping of raw header file information. directive is more powerful and better supports wrapping of raw header file information.
</p> </p>
<H4>5.4.7.2 Advanced renaming support</H4> <H4><a name="SWIG_advanced_renaming"></a>5.4.7.2 Advanced renaming support</H4>
<p> <p>
While writing <tt>%rename</tt> for specific declarations is simple enough, While writing <tt>%rename</tt> for specific declarations is simple enough,
@ -1797,12 +1805,12 @@ can use the <tt>"lowercamelcase"</tt> extended format specifier like this:
Some functions can be parametrized, for example the <tt>"strip"</tt> one Some functions can be parametrized, for example the <tt>"strip"</tt> one
strips the provided prefix from its argument. The prefix is specified as part strips the provided prefix from its argument. The prefix is specified as part
of the format string, following a colon after the function name: of the format string, following a colon after the function name:
</p>
<div class="code"> <div class="code">
<pre> <pre>
%rename("%(strip:[wx])s") ""; // wxHello -&gt; Hello; FooBar -&gt; FooBar %rename("%(strip:[wx])s") ""; // wxHello -&gt; Hello; FooBar -&gt; FooBar
</pre> </pre>
</div> </div>
</p>
<p> <p>
Below is the table summarizing all currently defined functions with an example Below is the table summarizing all currently defined functions with an example
@ -1924,7 +1932,8 @@ are exactly equivalent and <tt>%rename</tt> can be used to selectively ignore
multiple declarations using the previously described matching possibilities. multiple declarations using the previously described matching possibilities.
</p> </p>
<H4>5.4.7.3 Limiting global renaming rules</H4> <H4><a name="SWIG_limiting_renaming"></a>5.4.7.3 Limiting global renaming rules</H4>
<p> <p>
As explained in the previous sections, it is possible to either rename As explained in the previous sections, it is possible to either rename
@ -1977,7 +1986,7 @@ more complicated matches making it possible to write
</p> </p>
<div class="code"> <div class="code">
<pre> <pre>
%rename("%(lower)s", match$parentNode$name="SomeClass", %$isenum) ""; %rename("%(lowercase)s", match$parentNode$name="SomeClass", %$isenum) "";
</pre> </pre>
</div> </div>
<p> <p>
@ -2193,7 +2202,7 @@ variation installs the callbacks as all upper case constants such as
<div class="code"><pre> <div class="code"><pre>
/* Some callback functions */ /* Some callback functions */
%callback("%(upper)s"); %callback("%(uppercase)s");
int add(int,int); int add(int,int);
int sub(int,int); int sub(int,int);
int mul(int,int); int mul(int,int);
@ -2201,7 +2210,7 @@ int mul(int,int);
</pre></div> </pre></div>
<p> <p>
A format string of <tt>"%(lower)s"</tt> converts all characters to lower case. A format string of <tt>"%(lowercase)s"</tt> converts all characters to lower case.
A string of <tt>"%(title)s"</tt> capitalizes the first character and converts the A string of <tt>"%(title)s"</tt> capitalizes the first character and converts the
rest to lower case. rest to lower case.
</p> </p>

View file

@ -1173,7 +1173,7 @@ String *replace_captures(const char *input, String *subst, int captures[])
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Swig_string_regex() * Swig_string_regex()
* *
* Executes a regexp substitution. For example: * Executes a regular expression substitution. For example:
* *
* Printf(stderr,"gsl%(regex:/GSL_.*_/\\1/)s","GSL_Hello_") -> gslHello * Printf(stderr,"gsl%(regex:/GSL_.*_/\\1/)s","GSL_Hello_") -> gslHello
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */