diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-06-15 00:46:27 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-06-15 00:46:27 +0200 |
commit | ea23bb8aa4a5b66205a536e607fe8a7c983826ec (patch) | |
tree | 71e56ea29f80a78a2883bba907247160d6271779 /kernel | |
parent | 93685a77c6846be3e8e28c041688f668d132c30c (diff) | |
download | yosys-ea23bb8aa4a5b66205a536e607fe8a7c983826ec.tar.gz yosys-ea23bb8aa4a5b66205a536e607fe8a7c983826ec.tar.bz2 yosys-ea23bb8aa4a5b66205a536e607fe8a7c983826ec.zip |
Added "write_smv" skeleton
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/yosys.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/yosys.h b/kernel/yosys.h index 14277ade8..d4f46a519 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -147,8 +147,10 @@ struct shared_str { shared_str() { } shared_str(string s) { content = std::shared_ptr<string>(new string(s)); } shared_str(const char *s) { content = std::shared_ptr<string>(new string(s)); } - const char *c_str() { return content->c_str(); } - const string &str() { return *content; } + const char *c_str() const { return content->c_str(); } + const string &str() const { return *content; } + bool operator==(const shared_str &other) const { return *content == *other.content; } + unsigned int hash() const { return hashlib::hash_ops<std::string>::hash(*content); } }; using hashlib::mkhash; |