%apply also looks for a typedef match if it doesn't find a match at first
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6509 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2bf53ac3af
commit
f5adbd3f6f
1 changed files with 15 additions and 0 deletions
|
|
@ -396,6 +396,21 @@ Swig_typemap_apply(ParmList *src, ParmList *dest) {
|
||||||
/* See if there is a matching typemap in this scope */
|
/* See if there is a matching typemap in this scope */
|
||||||
sm = Swig_typemap_get(type,name,ts);
|
sm = Swig_typemap_get(type,name,ts);
|
||||||
|
|
||||||
|
/* if there is not matching, look for a typemap in the
|
||||||
|
original typedef, if any, like in:
|
||||||
|
|
||||||
|
typedef unsigned long size_t;
|
||||||
|
...
|
||||||
|
%apply(size_t) {my_size}; ==> %apply(unsigned long) {my_size};
|
||||||
|
*/
|
||||||
|
if (!sm) {
|
||||||
|
SwigType *ntype = SwigType_typedef_resolve(type);
|
||||||
|
if (Cmp(ntype,type) != 0) {
|
||||||
|
sm = Swig_typemap_get(ntype,name,ts);
|
||||||
|
}
|
||||||
|
Delete(ntype);
|
||||||
|
}
|
||||||
|
|
||||||
if (sm) {
|
if (sm) {
|
||||||
/* Got a typemap. Need to only merge attributes for methods that match our signature */
|
/* Got a typemap. Need to only merge attributes for methods that match our signature */
|
||||||
Iterator ki;
|
Iterator ki;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue