From ae586c92d7ccb945fb994c29571c257d02e5f6ee Mon Sep 17 00:00:00 2001 From: Marcus Müller <mmueller@gnuradio.org> Date: Sat, 12 Jun 2021 01:01:04 +0200 Subject: runtime: tags can be compared with < instead of offset_compare MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcus Müller <mmueller@gnuradio.org> --- gnuradio-runtime/python/gnuradio/gr/bindings/tags_python.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gnuradio-runtime/python') 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) -- cgit v1.2.3