diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2025-10-19 15:11:39 -0400 |
|---|---|---|
| committer | Alan Wu <XrXr@users.noreply.github.com> | 2025-10-21 16:48:45 -0400 |
| commit | 35c2230734e65e8ab55aa718ca6ea02ca9622984 (patch) | |
| tree | ffb88afff2f7bb787d467d571aa0163a48fbc988 /jit.c | |
| parent | 193b299b8d1b09de9de695f6fd88314ccfbf884b (diff) | |
ZJIT: Fix binding to `INVALID_SHAPE_ID` under `-std=c99 -pedantic`
```
/src/jit.c:19:5: error: ISO C restricts enumerator values to range of 'int' (4294967295 is too large) [-Werror,-Wpedantic]
19 | RB_INVALID_SHAPE_ID = INVALID_SHAPE_ID,
| ^ ~~~~~~~~~~~~~~~~
```
Diffstat (limited to 'jit.c')
| -rw-r--r-- | jit.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -22,6 +22,11 @@ enum robject_offsets { ROBJECT_OFFSET_AS_ARY = offsetof(struct RObject, as.ary), }; +// Manually bound in rust since this is out-of-range of `int`, +// so this can't be in a `enum`, and we avoid `static const` +// to avoid allocating storage for the constant. +const shape_id_t rb_invalid_shape_id = INVALID_SHAPE_ID; + unsigned int rb_iseq_encoded_size(const rb_iseq_t *iseq) { |
