Document %rename syntax using quotes (for Bug #1252361)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7802 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5b6983d2e1
commit
3a2e5bb44e
1 changed files with 4 additions and 0 deletions
|
|
@ -1751,14 +1751,18 @@ done using <tt>%rename</tt>. For example:
|
|||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%rename("foo_short") foo(short);
|
||||
%rename(foo_long) foo(long);
|
||||
|
||||
void foo(int);
|
||||
void foo(short); // Accessed as foo_short()
|
||||
void foo(long); // Accessed as foo_long()
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Note that the quotes around the new name are optional, however,
|
||||
should the new name be a C/C++ keyword they would be essential in order to avoid a parsing error.
|
||||
The <tt>%ignore</tt> and <tt>%rename</tt> directives are both rather powerful
|
||||
in their ability to match declarations. When used in their simple form, they apply to
|
||||
both global functions and methods. For example:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue