[MERGE] faster iter_changes

Alexander Belchenko bialix at ukr.net
Thu Sep 18 09:01:12 BST 2008


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

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).

Or something like this.		


+cdef extern from "arpa/inet.h":
+    unsigned long htonl(unsigned long)
+
+

^-- I'm not sure arpa is available on Windows.

	




More information about the bazaar mailing list