From: | Manfred Spraul <manfred(at)colorfullife(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Double linked list with one pointer |
Date: | 2003-12-07 17:19:26 |
Message-ID: | 3FD3611E.4090409@colorfullife.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
>Greg Stark <gsstark(at)mit(dot)edu> writes:
>
>
>>Treating pointers as integers is technically nonportable but
>>realistically you would be pretty hard pressed to find any
>>architecture anyone runs postgres on where there isn't some integer
>>datatype that you can cast both directions from pointers safely.
>>
>>
>
>... like, say, Datum. We already make that assumption, so there's no
>new portability risk involved.
>
>
There is a new type in C99 for "integer that can hold a pointer value".
I think it's called intptr_t resp. uintptr_t, but I don't have the
standard around.
It will be necessary for a 64-bit Windows port: Microsoft decided that
pointer are 64-bit on WIN64, int&long remain 32-bit. Microsoft's own
typedefs are UINT_PTR, DWORD_PTR, INT_PTR.
--
Manfred
From | Date | Subject | |
---|---|---|---|
Next Message | NK | 2003-12-07 19:13:13 | Problem: Relation Variable |
Previous Message | Tom Lane | 2003-12-07 16:40:50 | Re: Double linked list with one pointer |