File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -383,10 +383,7 @@ rb_shape_each_shape_id(each_shape_callback callback, void *data)
383
383
RUBY_FUNC_EXPORTED rb_shape_t *
384
384
rb_shape_lookup (shape_id_t shape_id )
385
385
{
386
- uint32_t offset = (shape_id & SHAPE_ID_OFFSET_MASK );
387
- RUBY_ASSERT (offset != INVALID_SHAPE_ID );
388
-
389
- return & GET_SHAPE_TREE ()-> shape_list [offset ];
386
+ return RSHAPE (shape_id );
390
387
}
391
388
392
389
RUBY_FUNC_EXPORTED shape_id_t
Original file line number Diff line number Diff line change @@ -92,7 +92,10 @@ typedef struct {
92
92
redblack_node_t * shape_cache ;
93
93
unsigned int cache_size ;
94
94
} rb_shape_tree_t ;
95
+
96
+ RUBY_SYMBOL_EXPORT_BEGIN
95
97
RUBY_EXTERN rb_shape_tree_t * rb_shape_tree_ptr ;
98
+ RUBY_SYMBOL_EXPORT_END
96
99
97
100
union rb_attr_index_cache {
98
101
uint64_t pack ;
@@ -149,7 +152,14 @@ RBASIC_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
149
152
#endif
150
153
}
151
154
152
- #define RSHAPE rb_shape_lookup
155
+ static inline rb_shape_t *
156
+ RSHAPE (shape_id_t shape_id )
157
+ {
158
+ uint32_t offset = (shape_id & SHAPE_ID_OFFSET_MASK );
159
+ RUBY_ASSERT (offset != INVALID_SHAPE_ID );
160
+
161
+ return & GET_SHAPE_TREE ()-> shape_list [offset ];
162
+ }
153
163
154
164
int32_t rb_shape_id_offset (void );
155
165
You can’t perform that action at this time.
0 commit comments