Re: Double linked list with one pointer

Поиск
Список
Период
Сортировка
От Manfred Spraul
Тема Re: Double linked list with one pointer
Дата
Msg-id 3FD3611E.4090409@colorfullife.com
обсуждение исходный текст
Ответ на Re: Double linked list with one pointer  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Double linked list with one pointer  (Abhijit Menon-Sen <ams@wiw.org>)
Список pgsql-hackers
Tom Lane wrote:

>Greg Stark <gsstark@mit.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Double linked list with one pointer
Следующее
От: NK
Дата:
Сообщение: Help!:Convert String to relation variable