]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Clean-up, simplify, and slightly speed-up bounds logic in set_pop().
authorRaymond Hettinger <python@rcn.com>
Mon, 19 Jan 2015 00:06:18 +0000 (16:06 -0800)
committerRaymond Hettinger <python@rcn.com>
Mon, 19 Jan 2015 00:06:18 +0000 (16:06 -0800)
commit9cd6a789c6bd96e89b21b796292138d77d94c5aa
treeef69ea8492916be706e0e976ec49f48ee7f18712
parentb53f0fbf96ec0b1f9ad7ddad5e9480d17e48e27a
Clean-up, simplify, and slightly speed-up bounds logic in set_pop().

Elsewhere in the setobject.c code we do a bitwise-and with the mask
instead of using a conditional to reset to zero on wrap-around.
Using that same technique here use gives cleaner, faster, and more
consistent code.
Objects/setobject.c