%naturalvar documentation added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8644 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c266855eb5
commit
20ac2ec248
3 changed files with 72 additions and 11 deletions
|
|
@ -52,7 +52,7 @@
|
|||
<li><a href="#SWIG_nn32">Typedef and structures</a>
|
||||
<li><a href="#SWIG_nn33">Character strings and structures</a>
|
||||
<li><a href="#SWIG_nn34">Array members</a>
|
||||
<li><a href="#SWIG_nn35">Structure data members</a>
|
||||
<li><a href="#SWIG_structure_data_members">Structure data members</a>
|
||||
<li><a href="#SWIG_nn36">C constructors and destructors </a>
|
||||
<li><a href="#SWIG_adding_member_functions">Adding member functions to C structures</a>
|
||||
<li><a href="#SWIG_nn38">Nested structures</a>
|
||||
|
|
@ -2114,7 +2114,7 @@ discussed in a later chapter. In many cases, the warning message is
|
|||
harmless.
|
||||
</p>
|
||||
|
||||
<H3><a name="SWIG_nn35"></a>5.5.4 Structure data members</H3>
|
||||
<H3><a name="SWIG_structure_data_members"></a>5.5.4 Structure data members</H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2135,8 +2135,9 @@ typedef struct Bar {
|
|||
</div>
|
||||
|
||||
<p>
|
||||
When a structure member is wrapped, it is always handled as a pointer.
|
||||
For example:
|
||||
When a structure member is wrapped, it is handled as a pointer, unless the <tt>%naturalvar</tt> directive
|
||||
is used where it is handled more like a C++ reference (see <a href="SWIGPlus.html#SWIGPlus_member_data">C++ Member data</a>).
|
||||
The accessors to the member variable as a pointer is effectively wrapped as follows:
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
|
|
@ -2211,6 +2212,7 @@ void Foo_w_set(FOO *f, WORD value) {
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<p>
|
||||
<b>Compatibility Note: </b> SWIG-1.3.11 and earlier releases transformed all non-primitive member datatypes
|
||||
to pointers. Starting in SWIG-1.3.12, this transformation <em>only</em> occurs if a datatype is known to be a structure,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue