diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-08-16 11:43:35 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-08-16 15:43:43 +0900 |
commit | 129b4936bf8c556e9d400852ccd5b165dbe91499 (patch) | |
tree | 3780de5d5ff10a57f0fbf0e6c2378d2abbe9934a | |
parent | 08db4bc672eea0426c786ceece3545ac44eccad6 (diff) |
Simplify and clarify bitmask calculation
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11389
-rw-r--r-- | shape.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -103,7 +103,7 @@ redblack_value(redblack_node_t * node) { // Color is stored in the bottom bit of the shape pointer // Mask away the bit so we get the actual pointer back - return (rb_shape_t *)((uintptr_t)node->value & (((uintptr_t)-1) - 1)); + return (rb_shape_t *)((uintptr_t)node->value & ~(uintptr_t)1); } #ifdef HAVE_MMAP |