Unmangle private names ('__' prefix) in class declarations.

Fixes #166.
This commit is contained in:
Michael Hansen
2019-10-10 14:47:48 -07:00
parent 375b8b0c68
commit de78e1b882
10 changed files with 67 additions and 0 deletions

View File

@@ -14,10 +14,18 @@ public:
bool isEqual(PycRef<PycObject> obj) const override;
bool isEqual(const std::string& str) const { return m_value == str; }
bool startsWith(const std::string& str) const
{
return m_value.substr(0, str.size()) == str;
}
void load(class PycData* stream, class PycModule* mod) override;
int length() const { return (int)m_value.size(); }
const char* value() const { return m_value.c_str(); }
const std::string &strValue() const { return m_value; }
void setValue(std::string str) { m_value = std::move(str); }
private:
std::string m_value;