summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/types.py1
-rw-r--r--type.cpp19
2 files changed, 14 insertions, 6 deletions
diff --git a/python/types.py b/python/types.py
index 0acbdf55..e9e50711 100644
--- a/python/types.py
+++ b/python/types.py
@@ -140,6 +140,7 @@ class QualifiedName:
name_list[i] = self.name[i].encode("utf-8")
result.name = name_list
result.nameCount = len(self.name)
+ result.join = "::".encode("utf-8")
return result
@staticmethod
diff --git a/type.cpp b/type.cpp
index 1cab11bd..f3ad65a6 100644
--- a/type.cpp
+++ b/type.cpp
@@ -41,8 +41,6 @@ NameList::NameList(const BNQualifiedName* name)
}
-
-
NameList::NameList(const string& name, const string& join) : m_join(join)
{
if (!name.empty())
@@ -76,31 +74,40 @@ NameList& NameList::operator=(const vector<string>& name)
NameList& NameList::operator=(const NameList& name)
{
m_name = name.m_name;
+ m_join = name.m_join;
return *this;
}
bool NameList::operator==(const NameList& other) const
{
- return m_name == other.m_name;
+ return m_name == other.m_name && m_join == other.m_join;
}
bool NameList::operator!=(const NameList& other) const
{
- return m_name != other.m_name;
+ return m_name != other.m_name && m_join != other.m_join;
}
bool NameList::operator<(const NameList& other) const
{
- return m_name < other.m_name;
+ if (m_name < other.m_name)
+ return true;
+ if (m_name > other.m_name)
+ return false;
+ return m_join < other.m_join;
}
bool NameList::operator>(const NameList& other) const
{
- return m_name > other.m_name;
+ if (m_name > other.m_name)
+ return true;
+ if (m_name < other.m_name)
+ return false;
+ return m_join > other.m_join;
}