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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 13 Aug 2019 00:28:02 +0000 (20:28 -0400)
commit7a2a232886db556f09e7ea7123e44adaa2690cb3
treeba23bc046dba7f9821ff37c5733acd1c63324329
parentf865c2aa246e2bd94037b02b7f3b23e4f59985f6
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.023978 seconds and 4 git commands to generate.