From 0fe5c564362b711601acfa5304ac8f751a0bb40b Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 2 Nov 2004 01:50:21 +0000 Subject: [PATCH] last fixes for namespaces git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6607 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/CParse/parser.y | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index e37814f92..7ffaf9365 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -723,7 +723,14 @@ static String *resolve_namespace_class(String *cname) { Node *ns; String *prefix = Swig_scopename_prefix(cname); String *base = Swig_scopename_last(cname); - if (!prefix) { + if (prefix && (Strncmp(prefix,"::",2) == 0)) { + String *nprefix = NewString(Char(prefix)+2); + Delete(prefix); + prefix= nprefix; + Printf(stderr,"pb %s %s\n",prefix, base); + } + + if (!prefix || (Len(prefix) == 0)) { /* Use the global scope */ Symtab *symtab = Swig_symbol_current(); Node *pn = parentNode(symtab);