Re: ssize_t vs win64
| От | Bruce Momjian |
|---|---|
| Тема | Re: ssize_t vs win64 |
| Дата | |
| Msg-id | 201001030007.o0307nI20277@momjian.us обсуждение исходный текст |
| Ответ на | Re: ssize_t vs win64 (Magnus Hagander <magnus@hagander.net>) |
| Ответы |
Re: ssize_t vs win64
|
| Список | pgsql-hackers |
Magnus Hagander wrote: > On Sun, Jan 3, 2010 at 01:01, Bruce Momjian <bruce@momjian.us> wrote: > > Tom Lane wrote: > >> Bruce Momjian <bruce@momjian.us> writes: > >> > Tom Lane wrote: > >> >> I think the Python guys are up against the same problem as us, namely > >> >> substituting for the platform's failure to define the type. > >> > >> > I am unclear if accepting what Python chose as a default is the right > >> > route vs. doing more research. > >> > >> What exactly do you think we might do differently? ?There is only one > >> sane definition for ssize_t on a 64-bit platform. > > > > Well, I saw two definitions listed in this thread, and it wasn't clear > > to me the Python one was known to be the correct one: > > > > ? ? ? ?PostgreSQL has it as > > ? ? ? ?typedef long ssize_t; > > > > ? ? ? ?And python has it as: > > ? ? ? ?typedef __int64 ssize_t; > > You're missing the crucial point: That is that PostgreSQL uses long on > *32-bit*. Python uses __int64 on *64-bit*. PostgreSQL didn't *have* a > definition on 64-bit, so we fell back on the 32-bit one. OK, so my question is whether __int64 is the right definition or only what Python chose. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-hackers по дате отправления: