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
|
* Typemaps are stored in a collection of nested hash tables. Something like
|
||||||
* this:
|
* this:
|
||||||
*
|
*
|
||||||
xo * [ type ]
|
* [ type ]
|
||||||
* +-------- [ name ]
|
* +-------- [ name ]
|
||||||
* +-------- [ 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");
|
kwmatch = Swig_typemap_get_option(tm,"match");
|
||||||
if (kwmatch) {
|
if (kwmatch) {
|
||||||
String *tmname = NewStringf("tmap:%s",kwmatch);
|
String *tmname = NewStringf("tmap:%s",kwmatch);
|
||||||
Hash *tmin = Getattr(p,tmname);
|
String *tmin = Getattr(p,tmname);
|
||||||
Delete(tmname);
|
Delete(tmname);
|
||||||
#ifdef SWIG_DEBUG
|
#ifdef SWIG_DEBUG
|
||||||
if (tm) Printf(stdout,"matching: %s\n", kwmatch);
|
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;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
SwigType *typetm = Getattr(tm,k_type);
|
SwigType *typetm = Getattr(tm,k_type);
|
||||||
SwigType *typein = Getattr(tmin,k_type);
|
String *temp = NewStringf("tmap:%s:match_type",kwmatch);
|
||||||
if (!typein) {
|
SwigType *typein = Getattr(p,temp);
|
||||||
String *temp = NewStringf("tmap:%s:match_type",kwmatch);
|
Delete(temp);
|
||||||
typein = Getattr(p,temp);
|
|
||||||
Delete(temp);
|
|
||||||
}
|
|
||||||
if (!Equal(typein,typetm)) {
|
if (!Equal(typein,typetm)) {
|
||||||
p = nextSibling(p);
|
p = nextSibling(p);
|
||||||
continue;
|
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 {
|
} else {
|
||||||
p = nextSibling(p);
|
p = nextSibling(p);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue