Get rid of separate cmodtype typemap
Use the same ctype for wrapper declarations and definitions and just expand $resolved_type differently in the two cases. This simplifies the typemaps and ensures that the declarations and definitions use the same types, at least for all non-object parameters.
This commit is contained in:
parent
5de29df38e
commit
8cae88dd39
4 changed files with 51 additions and 112 deletions
|
|
@ -431,20 +431,6 @@ area: 7.068583
|
|||
</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>cmodtype</tt></td>
|
||||
<td>Provides types used by wrapper functions and</br>
|
||||
Casts of function parameters of wrapper function calls</br>
|
||||
</br>
|
||||
<code>
|
||||
extern void _wrap_MyClass_delete(SwigObj *o);</br>
|
||||
</br>
|
||||
void MyClass_delete(MyClass *c) {</br>
|
||||
_wrap_MyClass_delete((Swig_Obj *)c);</br>
|
||||
}
|
||||
</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>in</tt></td>
|
||||
<td>Mapping of wrapper functions parameters to local C++ variables</br>
|
||||
|
|
@ -556,7 +542,7 @@ A typical wrapper will be composited with these [optional] blocks:
|
|||
Let's go through it step by step and start with the wrapper prototype
|
||||
|
||||
<div class="targetlang"><pre>
|
||||
cmodtype cmodtype cmodtype
|
||||
ctype ctype ctype
|
||||
--------- --------- ---
|
||||
SwigObj * _wrap_someFunction(SwigObj * carg1, int carg2);
|
||||
</pre></div>
|
||||
|
|
@ -564,7 +550,7 @@ SwigObj * _wrap_someFunction(SwigObj * carg1, int carg2);
|
|||
As first unit of the wrapper code, a variable to hold the return value of the function is emitted to the wrapper's body
|
||||
|
||||
<div class="targetlang"><pre>
|
||||
cmodtype
|
||||
ctype
|
||||
---------
|
||||
SwigObj * result;
|
||||
</pre></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue