4 ms·
Yes you can use uintptr_t. You just can’t cast a pointer to uintptr_t, then store that int into memory, then load it back, then cast it back to pointer, and th
by pizlonator 2y ago
Yes you can use uintptr_t.
You just can’t cast a pointer to uintptr_t, then store that int into memory, then load it back, then cast it back to pointer, and then dereference that pointer.
- layer8 2y agoOkay, but the C standard does allow exactly that for void*.
- pizlonator 2y agoYou can do exactly that with `void*` in Fil-C. I just don’t let integer types carry capabilities. If I did, things would get weird (like if you said `x + y` and both happened to carry capabilities then what would you get?)
- deleted 2y ago[deleted]