aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2020-07-23 19:55:25 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2020-07-23 19:55:25 +0200
commitcca7d3aef7e97228bddc04601e5c6f1d03894be9 (patch)
tree1c7d252ebc1ed95eb488c35f1db17bf304d44875
parent6bb457be69af2e27e48ebbd48e8c3a32e114b0f2 (diff)
downloadnextpnr-cca7d3aef7e97228bddc04601e5c6f1d03894be9.tar.gz
nextpnr-cca7d3aef7e97228bddc04601e5c6f1d03894be9.tar.bz2
nextpnr-cca7d3aef7e97228bddc04601e5c6f1d03894be9.zip
possible fix
-rw-r--r--common/pycontainers.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/common/pycontainers.h b/common/pycontainers.h
index 15e502d1..0a5092a3 100644
--- a/common/pycontainers.h
+++ b/common/pycontainers.h
@@ -249,7 +249,7 @@ template <typename T1, typename T2, typename value_conv> struct map_pair_wrapper
struct pair_iterator_wrapper
{
- static py::object next(std::pair<wrapped_pair &, int> &iter)
+ static py::object next(std::pair<wrapped_pair &, int> &&iter)
{
if (iter.second == 0) {
iter.second++;
@@ -266,8 +266,7 @@ template <typename T1, typename T2, typename value_conv> struct map_pair_wrapper
static void wrap(py::module &m, const char *python_name)
{
- //FIXME
- //py::class_<std::pair<wrapped_pair &, int>>(m, python_name).def("__next__", next);
+ py::class_<std::pair<wrapped_pair &, int>>(m, python_name).def("__next__", next);
}
};
@@ -373,7 +372,7 @@ template <typename T1, typename T2> struct map_pair_wrapper_uptr
struct pair_iterator_wrapper
{
- static py::object next(std::pair<wrapped_pair &, int> &iter)
+ static py::object next(std::pair<wrapped_pair &, int> &&iter)
{
if (iter.second == 0) {
iter.second++;
@@ -390,8 +389,7 @@ template <typename T1, typename T2> struct map_pair_wrapper_uptr
static void wrap(py::module &m, const char *python_name)
{
- //FIXME
- //py::class_<std::pair<wrapped_pair &, int>>(m, python_name).def("__next__", next);
+ py::class_<std::pair<wrapped_pair &, int>>(m, python_name).def("__next__", next);
}
};