tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: intptr_t, kqueue: history/rationale of type change
On Thu, Oct 08, 2026 at 08:54:08AM -0400, Greg Troxel wrote:
> I now think that intptr_t is "pointer stored in an int", not a pointer
> to an int.
intptr_t is a signed integer type that can hold the value of a "void*"
without data loss. The C standard says you can convert the value of a
void * to intptr_t, convert that back to void* and compare the result
with the original void* and the comparision is required to come up equal.
uintptr_t is an unsigned integer type with the same property.
Martin
Home |
Main Index |
Thread Index |
Old Index