[D] Fixed namespace handling bug introduced in r13915.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13920 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
David Nadlinger 2012-11-20 20:06:21 +00:00
commit 1752b62156

View file

@ -3669,9 +3669,15 @@ private:
bool inProxyModule(const String *type_name) const {
if (!split_proxy_dmodule) {
String *nspace = createOuterNamespaceNames(type_name);
bool result = false;
if (getNSpace() && nspace)
// Check if strings are either both null (no namespace) or are both
// non-null and have the same contents. Cannot use Strcmp for this
// directly because of its strange way of handling the case where only
// one argument is 0 ("<").
bool result = !nspace && !getNSpace();
if (nspace && getNSpace())
result = (Strcmp(nspace, getNSpace()) == 0);
Delete(nspace);
return result;
}