summaryrefslogtreecommitdiff
path: root/shape.c
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2022-12-02 12:33:20 -0500
committerTakashi Kokubun <takashikkbn@gmail.com>2022-12-02 12:53:51 -0800
commit4c5e89791b2e5e168aadb949c90f804736a472bd (patch)
tree105b2fcc73e3409abf84e26b5eb5718dcc16a559 /shape.c
parent606653e43a8207e15d6c3b450754d2a8bd349fc9 (diff)
downloadruby-4c5e89791b2e5e168aadb949c90f804736a472bd.tar.gz
Extracted rb_shape_id_offset
Diffstat (limited to 'shape.c')
-rw-r--r--shape.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/shape.c b/shape.c
index db9e331378..7dba1015a0 100644
--- a/shape.c
+++ b/shape.c
@@ -306,6 +306,12 @@ rb_shape_id_num_bits(void)
return SHAPE_ID_NUM_BITS;
}
+int32_t
+rb_shape_id_offset(void)
+{
+ return 8 - rb_shape_id_num_bits() / 8;
+}
+
uint8_t
rb_shape_flag_shift(void)
{