At http://bzr.arbash-meinel.com/plugins/groupcompress_rabin
------------------------------------------------------------
revno: 65
revision-id: [email protected]
parent: [email protected]
committer: John Arbash Meinel <[email protected]>
branch nick: groupcompress_rabin
timestamp: Fri 2009-02-27 22:43:47 -0600
message:
Create a wrapper function, so that lsprof will properly attribute time spent.
=== modified file '_groupcompress_c.pyx'
--- a/_groupcompress_c.pyx 2009-02-28 04:28:02 +0000
+++ b/_groupcompress_c.pyx 2009-02-28 04:43:47 +0000
@@ -75,6 +75,10 @@
# free(val[0])
# val[0] = NULL
+def make_delta_index(source):
+ return DeltaIndex(source)
+
+
cdef class DeltaIndex:
cdef object _source
@@ -89,7 +93,6 @@
def __init__(self, source):
self._source = None
self._index = NULL
-
self._create_delta_index(source)
def _create_delta_index(self, source):
=== modified file 'groupcompress.py'
--- a/groupcompress.py 2009-02-28 04:29:33 +0000
+++ b/groupcompress.py 2009-02-28 04:43:47 +0000
@@ -173,7 +173,7 @@
# we could try a delta against whatever the last delta we
# computed, (the idea being we just computed the delta_index, so
# we re-use it here, and see if that is good enough, etc)
- delta_index = _groupcompress_c.DeltaIndex(source_text)
+ delta_index = _groupcompress_c.make_delta_index(source_text)
delta = delta_index.make_delta(target_text)
if (delta is None
or len(delta) > len(target_text) / 2):
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits