fix for freearg with value especialization
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8525 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cea522b4f8
commit
571b48e269
1 changed files with 15 additions and 8 deletions
|
|
@ -26,7 +26,7 @@ static void replace_embedded_typemap(String *s);
|
|||
* Typemaps are stored in a collection of nested hash tables. Something like
|
||||
* this:
|
||||
*
|
||||
xo * [ type ]
|
||||
* [ type ]
|
||||
* +-------- [ name ]
|
||||
* +-------- [ name ]
|
||||
*
|
||||
|
|
@ -1504,7 +1504,7 @@ Swig_typemap_attach_parms(const String_or_char *op, ParmList *parms, Wrapper *f)
|
|||
kwmatch = Swig_typemap_get_option(tm,"match");
|
||||
if (kwmatch) {
|
||||
String *tmname = NewStringf("tmap:%s",kwmatch);
|
||||
Hash *tmin = Getattr(p,tmname);
|
||||
String *tmin = Getattr(p,tmname);
|
||||
Delete(tmname);
|
||||
#ifdef SWIG_DEBUG
|
||||
if (tm) Printf(stdout,"matching: %s\n", kwmatch);
|
||||
|
|
@ -1518,16 +1518,23 @@ Swig_typemap_attach_parms(const String_or_char *op, ParmList *parms, Wrapper *f)
|
|||
continue;
|
||||
} else {
|
||||
SwigType *typetm = Getattr(tm,k_type);
|
||||
SwigType *typein = Getattr(tmin,k_type);
|
||||
if (!typein) {
|
||||
String *temp = NewStringf("tmap:%s:match_type",kwmatch);
|
||||
typein = Getattr(p,temp);
|
||||
Delete(temp);
|
||||
}
|
||||
String *temp = NewStringf("tmap:%s:match_type",kwmatch);
|
||||
SwigType *typein = Getattr(p,temp);
|
||||
Delete(temp);
|
||||
if (!Equal(typein,typetm)) {
|
||||
p = nextSibling(p);
|
||||
continue;
|
||||
} else {
|
||||
int nnmatch;
|
||||
Hash *tmapin = Swig_typemap_search_multi(kwmatch,p,&nnmatch);
|
||||
String *tmname = Getattr(tm,"pname");
|
||||
String *tnname = Getattr(tmapin,"pname");
|
||||
if (!(tmname && tnname && Equal(tmname, tnname)) && !(!tmname && !tnname)) {
|
||||
p = nextSibling(p);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
p = nextSibling(p);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue