Skip to content

Commit fae2039

Browse files
committed
Use an enum instead of a macro for bindgen
1 parent 1679f1b commit fae2039

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

shape.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ enum shape_id_fl_type {
4848

4949
// This masks allows to check if a shape_id contains any ivar.
5050
// It rely on ROOT_SHAPE_WITH_OBJ_ID==1.
51-
#define SHAPE_ID_HAS_IVAR_MASK 0x807fffe
52-
STATIC_ASSERT(shape_id_has_ivar_mask, SHAPE_ID_HAS_IVAR_MASK == (SHAPE_ID_FL_TOO_COMPLEX | (SHAPE_ID_OFFSET_MASK - 1)));
51+
enum {
52+
SHAPE_ID_HAS_IVAR_MASK = SHAPE_ID_FL_TOO_COMPLEX | (SHAPE_ID_OFFSET_MASK - 1),
53+
};
5354

5455
// The interpreter doesn't care about frozen status or slot size when reading ivars.
5556
// So we normalize shape_id by clearing these bits to improve cache hits.

yjit/src/cruby_bindings.inc.rs

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy