vint.pyx | raw changeset files shortlog |
1.1 --- a/vint.pyx Fri Sep 11 01:21:09 2009 +0200 1.2 +++ b/vint.pyx Fri Sep 11 01:27:18 2009 +0200 1.3 @@ -8,6 +8,11 @@ 1.4 cdef char bytes[40] # NOTE: Arbitrary limit. 1.5 cdef int lsd, i 1.6 1.7 + if number < 128: 1.8 + bytes[0] = number 1.9 + s = PyString_FromStringAndSize(bytes, 1) 1.10 + return s 1.11 + 1.12 i = 0 1.13 while number != 0: 1.14 lsd = number & 127