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
This commit is contained in:
parent
163d15e2e3
commit
31485a7b3b
1 changed files with 9 additions and 12 deletions
|
|
@ -3261,15 +3261,13 @@ public:
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void addOpenNamespace(const String *nspace, File *file) {
|
void addOpenNamespace(const String *nspace, File *file) {
|
||||||
if (namespce) {
|
if (namespce || nspace) {
|
||||||
if (namespce || nspace) {
|
Printf(file, "namespace ");
|
||||||
Printf(file, "namespace ");
|
if (namespce)
|
||||||
if (namespce)
|
Printv(file, namespce, nspace ? "." : "", NIL);
|
||||||
Printv(file, namespce, nspace ? "." : "", NIL);
|
if (nspace)
|
||||||
if (nspace)
|
Printv(file, nspace, NIL);
|
||||||
Printv(file, nspace, NIL);
|
Printf(file, " {\n");
|
||||||
Printf(file, " {\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3278,9 +3276,8 @@ public:
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void addCloseNamespace(const String *nspace, File *file) {
|
void addCloseNamespace(const String *nspace, File *file) {
|
||||||
if (namespce)
|
if (namespce || nspace)
|
||||||
if (namespce || nspace)
|
Printf(file, "\n}\n");
|
||||||
Printf(file, "\n}\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue