Added $typemap variable to typemaps. Feature request on mailing list.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@823 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ed10189a0b
commit
56c40c8a45
1 changed files with 5 additions and 0 deletions
|
|
@ -112,6 +112,7 @@ Swig_typemap_register(char *op, SwigType *type, String_or_char *pname, String_or
|
|||
}
|
||||
Setattr(tm2,"code",NewString(code));
|
||||
Setattr(tm2,"type",NewString(type));
|
||||
Setattr(tm2,"typemap",NewStringf("typemap(%s) %s", op, SwigType_str(type,pname)));
|
||||
if (pname) {
|
||||
Setattr(tm2,"pname", NewString(pname));
|
||||
}
|
||||
|
|
@ -436,6 +437,10 @@ char *Swig_typemap_lookup(char *op, SwigType *type, String_or_char *pname, Strin
|
|||
/* Now perform character replacements */
|
||||
Replace(s,"$source",source,DOH_REPLACE_ANY);
|
||||
Replace(s,"$target",target,DOH_REPLACE_ANY);
|
||||
{
|
||||
String *tmname = Getattr(tm,"typemap");
|
||||
if (tmname) Replace(s,"$typemap",tmname, DOH_REPLACE_ANY);
|
||||
}
|
||||
Replace(s,"$type",SwigType_str(type,0),DOH_REPLACE_ANY);
|
||||
{
|
||||
SwigType *ltype = Swig_clocal_type(type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue