diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2021-06-12 01:01:04 +0200 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-06-28 14:59:46 -0400 |
commit | ae586c92d7ccb945fb994c29571c257d02e5f6ee (patch) | |
tree | 6b44be32aa6faea1f4f4c51dbd70d5971872120c /gnuradio-runtime/python | |
parent | 84ba8636f4449e2d74d9bceaebba7c4afa756d60 (diff) |
runtime: tags can be compared with < instead of offset_compare
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Diffstat (limited to 'gnuradio-runtime/python')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gr/bindings/tags_python.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/tags_python.cc b/gnuradio-runtime/python/gnuradio/gr/bindings/tags_python.cc index 2487be0100..aaa97b3879 100644 --- a/gnuradio-runtime/python/gnuradio/gr/bindings/tags_python.cc +++ b/gnuradio-runtime/python/gnuradio/gr/bindings/tags_python.cc @@ -1,5 +1,6 @@ /* * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Marcus Müller * * This file is part of GNU Radio * @@ -14,10 +15,11 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(tags.h) */ -/* BINDTOOL_HEADER_FILE_HASH(73eb73e445943e224cdbae24b0b0ab76) */ +/* BINDTOOL_HEADER_FILE_HASH(25435955fa46de2924e0b648c4f8dd43) */ /***********************************************************************************/ #include <pybind11/complex.h> +#include <pybind11/operators.h> #include <pybind11/pybind11.h> #include <pybind11/stl.h> @@ -44,6 +46,8 @@ void bind_tags(py::module& m) py::arg("y"), D(tag_t, offset_compare)) + .def(py::self < py::self, D(tag_t, offset_compare)) + .def_readwrite("offset", &tag_t::offset) .def_readwrite("key", &tag_t::key) .def_readwrite("value", &tag_t::value) |