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

Alexander Belchenko bialix at ukr.net
Tue Jul 31 11:51:33 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lukáš Lalinský пишет:
> On Ut, 2007-07-31 at 12:13 +0300, Alexander Belchenko wrote: 
>> I don't know is it bug in Pyrex or in our usage of Pyrex, but I repeat
>> one more time:
>>
>> 	Pyrex substitute intptr_t with int in
>> 	generated C-code, so actually nor stdint.h nor intptr_t
>> 	is not used at all.
>>
>> intptr_t is not present in generated C-code. So, it's already
>> breaks compatibility with 64-bit platform.
> 
> If the ctypedef statement appears in a 'cdef extern from' section it
> will not be replaced. This happens only if it's moved to the top-level
> block.
> 
> For example my compiled _dirstate_helpers_c.c contains:
> 
>   __pyx_r = ((((intptr_t )__pyx_v_ptr) & ((sizeof(int )) - 1)) == 0);

When I compile original unmodified John's version I have not intptr_t
in C-code:

static int __pyx_f_19_dirstate_helpers_c__is_aligned(void (*__pyx_v_ptr)) {
  int __pyx_r;

  /* "E:\work\bzr.dev\bzrlib/_dirstate_helpers_c.pyx":115 */
  __pyx_k7;

  /* "E:\work\bzr.dev\bzrlib/_dirstate_helpers_c.pyx":119 */
  __pyx_r = ((((int )__pyx_v_ptr) & ((sizeof(int )) - 1)) == 0);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

I use Pyrex 0.9.5.1a.

Your patch solve problem with stdint.h but I anyway don't have intptr_t
in generated C-code. Pyrex bug?

!approve

[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGrxQ0zYr338mxwCURAgM3AKCRaH/VEhVACGMSwzIXqt37xOMyxwCeLxS9
245v6vZg8iG42T3uvLcpLkA=
=3Mbl
-----END PGP SIGNATURE-----



More information about the bazaar mailing list