diff --git a/dedupestore/_speedups.c b/dedupestore/_speedups.c index 7b83e4566..657eaf97d 100644 --- a/dedupestore/_speedups.c +++ b/dedupestore/_speedups.c @@ -111,11 +111,10 @@ ChunkifyIter_iternext(PyObject *self) c->window_size); } c->i++; - if(c->i == c->buf_size && c->last == c->window_size - 1) + if(c->i == c->buf_size && c->last == -1) { int old_last = c->last; c->last = c->i - 1; - printf("Max chunk size reached %d\n", c->last - old_last); return PyString_FromStringAndSize((char *)(c->data + old_last + 1), c->last - old_last); } diff --git a/dedupestore/chunkifier.py b/dedupestore/chunkifier.py index d2b7ff6ed..25340a5f1 100644 --- a/dedupestore/chunkifier.py +++ b/dedupestore/chunkifier.py @@ -73,7 +73,7 @@ class ChunkifyIter(object): self.data[self.i], self.window_size) self.i += 1 - if self.i == self.buf_size and self.last == self.window_size - 1: + if self.i == self.buf_size and self.last == -1: old_last = self.last self.last = self.i - 1 return self.data[old_last + 1:self.last + 1] diff --git a/setup.py b/setup.py index 4c789f6ba..dfbcd3c61 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup(name='Dedupestore', author=u'Jonas Borgström', author_email='jonas@borgstrom.se', packages=['dedupestore'], - ext_modules=[Extension('_speedups', ['dedupestore/_speedups.c'])], + ext_modules=[Extension('dedupestore._speedups', ['dedupestore/_speedups.c'])], entry_points = { 'console_scripts': [ 'dedupestore = dedupestore.archiver:main',