[PATCH][win32] problems compiling bzrlib/_dirstate_helpers_c.pyx with MSVC

Lukáš Lalinský lalinsky at gmail.com
Tue Jul 31 08:10:02 BST 2007


On Ut, 2007-07-31 at 07:06 +0300, Alexander Belchenko wrote:
> 1) you're using #include <stdint.h>, but MSVC is not C99 compiler, and don't have such
> header.
> 
> 	Actually you need only `typedef int intptr_t` from this header,
> 	but Pyrex is smart enough to substitute intptr_t with int in
> 	generated C-code, so actually stdint.h is not used at all.

This is not a good idea, it will break on 64-bit platforms. VC7 (which
is the preferred compiler for Python extensions) has intptr_t in io.h --
does Pyrex support #ifdefs so we can do something like?

#ifdef _MSC_VER
#include <io.h>
#else
#include <stdint.h>
#endif

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?ISO-8859-1?Q?digit=E1lne?=
	=?ISO-8859-1?Q?_podp=EDsan=E1?= =?UTF-8?Q?_=C4=8Das=C5=A5?=
	=?ISO-8859-1?Q?_spr=E1vy?=
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070731/80077c4a/attachment.pgp 


More information about the bazaar mailing list