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
|
Список | 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 по дате отправления: