Commit 4d45ce0
committed
Add Isize and Usize IntKinds for use in ParseCallbacks::int_macro
C macros are often used to define array/buffer size constants. In Rust,
representing these as `usize` is more natural than the fixed-bit-size
integer types, because it allows indexing and comparisons without
casting.
I also added `isize` while I was at it. Using these types is already
possible via `IntKind::Custom`, but given they are built-in integer
types like `u64` and `i64`, I figured having a separate enum variant
would be appropriate.1 parent b7b501f commit 4d45ce0
2 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
| |||
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
100 | | - | |
| 106 | + | |
101 | 107 | | |
102 | 108 | | |
103 | | - | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
0 commit comments