Rev 2676: Remove unused testing class in http://bzr.arbash-meinel.com/branches/bzr/0.19-dev/pyrex_knit_extract
John Arbash Meinel
john at arbash-meinel.com
Fri Aug 3 00:26:37 BST 2007
At http://bzr.arbash-meinel.com/branches/bzr/0.19-dev/pyrex_knit_extract
------------------------------------------------------------
revno: 2676
revision-id: john at arbash-meinel.com-20070802232606-z9rvcyiayw4grg0u
parent: john at arbash-meinel.com-20070802232426-mzvgu2kx022plzwh
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: pyrex_knit_extract
timestamp: Thu 2007-08-02 18:26:06 -0500
message:
Remove unused testing class
modified:
bzrlib/_knit_helpers_c.pyx knit_c.pyx-20070509143944-u42gy8w387a10m0j-1
-------------- next part --------------
=== modified file 'bzrlib/_knit_helpers_c.pyx'
--- a/bzrlib/_knit_helpers_c.pyx 2007-08-02 23:24:26 +0000
+++ b/bzrlib/_knit_helpers_c.pyx 2007-08-02 23:26:06 +0000
@@ -985,53 +985,3 @@
digest, deltas = extractor.extract_linedeltas()
return digest, deltas
-
-
-# This is just a test class for playing around with init/inflate, etc.
-cdef class Strm:
-
- cdef z_stream _strm
- cdef char *decomp_buffer
- cdef size_t decomp_buf_size
-
- def __new__(self):
- memset(&self._strm, 0, sizeof(z_stream))
- self.decomp_buffer = NULL
- self.decomp_buf_size = 0
-
- cdef int _dealloc(self) except -1:
- if self.decomp_buffer != NULL:
- PyMem_Free(self.decomp_buffer)
-
- def __dealloc__(self):
- self._dealloc()
-
- def init(self, decomp_size, gz_hunk):
- cdef char *c_data
- cdef ssize_t c_data_size
-
- self._dealloc()
- self.decomp_buf_size = decomp_size
- self.decomp_buffer = <char*>PyMem_Malloc(self.decomp_buf_size)
-
- c_data = PyString_AsString(gz_hunk)
- c_data_size = PyString_Size(gz_hunk)
-
- self._strm.next_in = <Bytef *>c_data
- self._strm.avail_in = c_data_size
- self._strm.next_out = <Bytef *>self.decomp_buffer
- self._strm.avail_out = self.decomp_buf_size
-
- inflateInit2(&self._strm, 15+16)
-
- def inflate(self, flag=0):
- cdef int retval
-
- retval = inflate(&self._strm, flag)
-
- return retval
-
- def __repr__(self):
- return 'Strm(next_in: %d %X, next_out: %d %X)' % (
- self._strm.avail_in, <int>self._strm.next_in,
- self._strm.avail_out, <int>self._strm.next_out)
More information about the bazaar-commits
mailing list