aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-12 15:51:51 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-12 15:51:51 +0200
commit136ce3d18f3fc463f9364773d481be6c3b0b46f7 (patch)
tree61650dbec3578314cc552cb1f7af459cc99ed496 /common
parent9c275d0a653b11f2a494321be2ab66678117db2d (diff)
parent472672ba9f04cfe20e1a391771cec2b5ba1d3fc2 (diff)
downloadnextpnr-136ce3d18f3fc463f9364773d481be6c3b0b46f7.tar.gz
nextpnr-136ce3d18f3fc463f9364773d481be6c3b0b46f7.tar.bz2
nextpnr-136ce3d18f3fc463f9364773d481be6c3b0b46f7.zip
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
Diffstat (limited to 'common')
-rw-r--r--common/nextpnr.h2
-rw-r--r--common/pybindings.cc5
2 files changed, 6 insertions, 1 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h
index fc14299d..4288f7fc 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -110,7 +110,7 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX IdString>
return obj.index;
}
};
-}
+} // namespace std
NEXTPNR_NAMESPACE_BEGIN
diff --git a/common/pybindings.cc b/common/pybindings.cc
index 8aa831ca..7c43c84f 100644
--- a/common/pybindings.cc
+++ b/common/pybindings.cc
@@ -123,6 +123,11 @@ BOOST_PYTHON_MODULE(MODULE_NAME)
def("parse_json", parse_json_shim);
def("load_design", load_design_shim);
+ class_<IdString>("IdString")
+ .def("__str__", &IdString::str,
+ return_value_policy<copy_const_reference>())
+ .def(self < self)
+ .def(self == self);
arch_wrap_python();
}