diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2010-03-17 19:35:45 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2010-03-17 19:35:45 +0000 |
commit | 31485a7b3b1ab157c8b14f49d07123aedccb0cdd (patch) | |
tree | f63600ee2f28ab8c06f5d5ad8b7656f6719dd33c /Source | |
parent | 163d15e2e388fbdba3a3c76da7ad49dccfcead7c (diff) | |
download | swig-31485a7b3b1ab157c8b14f49d07123aedccb0cdd.tar.gz |
Fix nspace when no -namespace is used (for C#)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11949 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Modules/csharp.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/Source/Modules/csharp.cxx b/Source/Modules/csharp.cxx index 8abc3307e..f70403326 100644 --- a/Source/Modules/csharp.cxx +++ b/Source/Modules/csharp.cxx @@ -3261,15 +3261,13 @@ public: * ----------------------------------------------------------------------------- */ void addOpenNamespace(const String *nspace, File *file) { - if (namespce) { - if (namespce || nspace) { - Printf(file, "namespace "); - if (namespce) - Printv(file, namespce, nspace ? "." : "", NIL); - if (nspace) - Printv(file, nspace, NIL); - Printf(file, " {\n"); - } + if (namespce || nspace) { + Printf(file, "namespace "); + if (namespce) + Printv(file, namespce, nspace ? "." : "", NIL); + if (nspace) + Printv(file, nspace, NIL); + Printf(file, " {\n"); } } @@ -3278,9 +3276,8 @@ public: * ----------------------------------------------------------------------------- */ void addCloseNamespace(const String *nspace, File *file) { - if (namespce) - if (namespce || nspace) - Printf(file, "\n}\n"); + if (namespce || nspace) + Printf(file, "\n}\n"); } /* ----------------------------------------------------------------------------- |