diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/nextpnr.h | 2 | ||||
-rw-r--r-- | common/pybindings.cc | 5 |
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(); } |