Commit 7baece6
committed
Use uintptr_t
uintptr_t is part of the C standard (<stdint.h>), so it works on all major platforms, including Linux, macOS, and Windows, for both 32-bit and 64-bit architectures.
On 32-bit systems, uintptr_t is a 32-bit unsigned integer.
On 64-bit systems, uintptr_t is a 64-bit unsigned integer.
It’s specifically designed for storing pointer values as integers safely, so any pointer-to-integer or integer-to-pointer cast using uintptr_t is portable and safe, unlike using unsigned int, which can break on 64-bit systems.1 parent 566ed82 commit 7baece6
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
0 commit comments