changeset 43479 | 8e89b6e1e0cd |
parent 43465 | 90aac60b6697 |
child 43793 | 29adf0a087a1 |
43478:54f4d094bab1 | 43479:8e89b6e1e0cd |
---|---|
72 v = v * 256 + ord(b) |
72 v = v * 256 + ord(b) |
73 return v |
73 return v |
74 |
74 |
75 |
75 |
76 def _str(v, l): |
76 def _str(v, l): |
77 # type: (int, int) -> bytes |
|
77 bs = b"" |
78 bs = b"" |
78 for p in pycompat.xrange(l): |
79 for p in pycompat.xrange(l): |
79 bs = pycompat.bytechr(v & 255) + bs |
80 bs = pycompat.bytechr(v & 255) + bs |
80 v >>= 8 |
81 v >>= 8 |
81 return bs |
82 return bs |