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



> I now think that intptr_t is "pointer stored in an int", not a
> pointer to an int.

Yes.  As C99 puts it:

       7.18.1.4  Integer types capable of holding object pointers

       [#1]  The  following  type  designates a signed integer type
       with the property that any valid  pointer  to  void  can  be
       converted  to  this  type, then converted back to pointer to
       void, and the result will  compare  equal  to  the  original
       pointer:

               intptr_t

       The  following type designates an unsigned integer type with
       the property that any valid pointer to void can be converted
       to  this  type,  then converted back to pointer to void, and
       the result will compare equal to the original pointer:

               uintptr_t

       These types are optional.

As for the rust of it, I am not competent to hold an opinion; my
interactions with rust have been mutually antagonistic.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index