Rev 4463: Fixed as per John and Martin reviews. in file:///home/vila/src/bzr/bugs/385453-make-pyrex/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Jun 23 07:58:25 BST 2009
At file:///home/vila/src/bzr/bugs/385453-make-pyrex/
------------------------------------------------------------
revno: 4463
revision-id: v.ladeuil+lp at free.fr-20090623065824-tgitxb0v96qa8utd
parent: v.ladeuil+lp at free.fr-20090622153942-aorq8hfs6en444fx
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: cleanup
timestamp: Tue 2009-06-23 08:58:24 +0200
message:
Fixed as per John and Martin reviews.
* bzrlib/_dirstate_helpers_pyx.pyx:
(_cmp_path_by_dirblock_intern): Renamed as requested.
-------------- next part --------------
=== modified file 'bzrlib/_dirstate_helpers_pyx.pyx'
--- a/bzrlib/_dirstate_helpers_pyx.pyx 2009-06-22 14:32:48 +0000
+++ b/bzrlib/_dirstate_helpers_pyx.pyx 2009-06-23 06:58:24 +0000
@@ -288,14 +288,14 @@
if not PyString_CheckExact(path2):
raise TypeError("'path2' must be a plain string, not %s: %r"
% (type(path2), path2))
- return __cmp_path_by_dirblock(PyString_AsString(path1),
- PyString_Size(path1),
- PyString_AsString(path2),
- PyString_Size(path2))
-
-
-cdef int __cmp_path_by_dirblock(char *path1, int path1_len,
- char *path2, int path2_len):
+ return _cmp_path_by_dirblock_intern(PyString_AsString(path1),
+ PyString_Size(path1),
+ PyString_AsString(path2),
+ PyString_Size(path2))
+
+
+cdef int _cmp_path_by_dirblock_intern(char *path1, int path1_len,
+ char *path2, int path2_len):
"""Compare two paths by what directory they are in.
see ``_cmp_path_by_dirblock`` for details.
@@ -413,7 +413,8 @@
cur = PyList_GetItem_object_void(paths, _mid)
cur_cstr = PyString_AS_STRING_void(cur)
cur_size = PyString_GET_SIZE_void(cur)
- if __cmp_path_by_dirblock(cur_cstr, cur_size, path_cstr, path_size) < 0:
+ if _cmp_path_by_dirblock_intern(cur_cstr, cur_size,
+ path_cstr, path_size) < 0:
_lo = _mid + 1
else:
_hi = _mid
@@ -465,7 +466,8 @@
cur = PyList_GetItem_object_void(paths, _mid)
cur_cstr = PyString_AS_STRING_void(cur)
cur_size = PyString_GET_SIZE_void(cur)
- if __cmp_path_by_dirblock(path_cstr, path_size, cur_cstr, cur_size) < 0:
+ if _cmp_path_by_dirblock_intern(path_cstr, path_size,
+ cur_cstr, cur_size) < 0:
_hi = _mid
else:
_lo = _mid + 1
More information about the bazaar-commits
mailing list