[MERGE] faster iter_changes

Robert Collins robertc at robertcollins.net
Thu Sep 18 09:08:55 BST 2008


On Thu, 2008-09-18 at 11:01 +0300, Alexander Belchenko wrote:
> Couple of obvious notes.
> 
> +# 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
> 
> 
> IMO it's better to use C enums here:
> 
> cdef enum:
> 	ERROR_PATH_NOT_FOUND = 3
> 	ERROR_DIRECTORY = 267

Ah, thats the syntax :P I meant to look it up, didn't get to it.

> Or even better using windows.h header:
> 
> cdef extern from "windows.h":
> 	int ERROR_PATH_NOT_FOUND
> 	int ERROR_DIRECTORY
> 
> (^-- should work but not tested).

I need to make sure it still builds on linux and on windows; I guess
what I need is a patch from a windows dev :P, then I can test it to make
sure it still builds on linux.

> Or something like this.		
> 
> 
> +cdef extern from "arpa/inet.h":
> +    unsigned long htonl(unsigned long)
> +
> +
> 
> ^-- I'm not sure arpa is available on Windows.

Ah. Well I'm sure there is an equivalent, we can abstract that in _dirstate_helper_c.h if needed with a small macro.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080918/33fc3950/attachment.pgp 


More information about the bazaar mailing list