Swig_symbol_string_qualify for destructors - bug exposed after last commit when fully qualifying destructor names during typemap searches

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13879 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-11-13 22:17:10 +00:00
commit 7aa339cb3f
2 changed files with 5 additions and 16 deletions

View file

@ -1800,7 +1800,7 @@ String *Swig_symbol_string_qualify(String *s, Symtab *st) {
char *c = Char(s);
int first_char = 1;
while (*c) {
if (isalpha((int) *c) || (*c == '_') || (*c == ':') || (isdigit((int) *c) && !first_char)) {
if (isalpha((int) *c) || (*c == '_') || (*c == ':') || (*c == '~' && first_char) || (isdigit((int) *c) && !first_char)) {
Putc(*c, id);
have_id = 1;
} else {

View file

@ -1339,22 +1339,11 @@ static String *Swig_typemap_lookup_impl(const_String_or_char_ptr tmap_method, No
pname = Getattr(node, "name");
/*
if (pname && node && Getattr(node, "sym:symtab")) {
if (!checkAttribute(node, "kind", "function")) {
Printf(stdout, "New check: %s %s %s\n", Getattr(node, "name"), nodeType(node), Getattr(node, "kind"));
}
}
*/
if (pname && node && Getattr(node, "sym:symtab")) {
/*
if (pname && node && checkAttribute(node, "kind", "function")) {
*/
/*
For functions, add on a qualified name search, for example
struct Foo {
int *foo(int bar) -> Foo::foo
};
/* Add on a qualified name search for any symbol, for example:
* struct Foo {
* int *foo(int bar) -> Foo::foo
* };
*/
Symtab *st = Getattr(node, "sym:symtab");
String *qsn = st ? Swig_symbol_string_qualify(pname, st) : 0;