[MERGE] (refreshed) pyrex iter-changes

John Arbash Meinel john at arbash-meinel.com
Fri Sep 26 00:33:15 BST 2008


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

Alexander Belchenko wrote:
> John Arbash Meinel пишет:
>> Robert Collins wrote:
>>> Just updating this patch to resolve NEWS issues.
>>> -Rob
>>
>> I haven't thoroughly reviewed your code yet, but I went ahead and
>> updated it so that it will compile using mingw32 (and I would assume
>> Visual Studio 2003, but I don't have that to test.)
>>
>> I'm also including the incremental change as a diff.
>>
>> This is built on top of my earlier python-compat.h changes.
>>
>> John
>> =:->
>>
> 
> John, for what reasons you and Robert still continue to using ints instead of enums?
> 
> +# This is the Windows equivalent of ENOTDIR
> +# It is defined in pywin32.winerror, but we don't want a strong dependency for
> +# just an error code.
> +# XXX: Perhaps we could get it from a windows header ?
> +cdef int ERROR_PATH_NOT_FOUND
> +ERROR_PATH_NOT_FOUND = 3
> +cdef int ERROR_DIRECTORY
> +ERROR_DIRECTORY = 267
> 
> I've provided better code already:
> 
> cdef enum:
> 	ERROR_PATH_NOT_FOUND = 3
> 	ERROR_DIRECTORY = 267
> 
> 
> 

a) On win32 we can now actually import the items directly from
Windows.h, though I'm not sure how we would get it when it isn't available.

b) Are the original values 'enum' or are the #define? I have the feeling
they are #define which could conflict with the enum definition.

c) I think it just a matter of *getting* to that point and forgetting.
We certainly can just update it.

I was just doing the minimum to get everything working, and that didn't
require switching it to an enum. I'll suggest it in my review, though.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjcH7sACgkQJdeBCYSNAAOJSgCfQ4n1VkGzg0VSGoZgRBnFEDTC
w7IAnAxnIMYFjYDIBIxpXjizliUUDKCf
=Iiun
-----END PGP SIGNATURE-----



More information about the bazaar mailing list