bt2: _IntegerRangeSet.add(): make it possible to add a single value
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 10 Aug 2019 19:46:37 +0000 (15:46 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:21 +0000 (11:58 -0400)
commit44d784282e368dbbf68345f13220a77ffacbaff4
tree16079626441435f2bf501b2fb14d9bedfd058d9d
parent71e8e5c5b3784d0ec462f443d6bae629bb942fc2
bt2: _IntegerRangeSet.add(): make it possible to add a single value

This patch makes it possible to do:

    my_range_set.add(23)

which is the equivalent of:

    my_range_set.add((23, 23))

It also makes it possible to do:

    bt2.SignedIntegerRangeSet(-17)
    bt2.UnsignedIntegerRangeSet(17)

which is the equivalent of:

    bt2.SignedIntegerRangeSet(-17, -17)
    bt2.UnsignedIntegerRangeSet(17, 17)

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I44bf1a257422fb9e74835a300eeda948a8e5d067
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1874
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/bindings/python/bt2/bt2/integer_range_set.py
tests/bindings/python/bt2/test_integer_range_set.py
This page took 0.027317 seconds and 4 git commands to generate.