Show More
@@ -38,8 +38,12 b' def _fastsha1(s):' | |||||
38 |
|
38 | |||
39 | import __builtin__ |
|
39 | import __builtin__ | |
40 |
|
40 | |||
41 | def fakebuffer(sliceable, offset=0): |
|
41 | if sys.version_info[0] < 3: | |
42 |
|
|
42 | def fakebuffer(sliceable, offset=0): | |
|
43 | return sliceable[offset:] | |||
|
44 | else: | |||
|
45 | def fakebuffer(sliceable, offset=0): | |||
|
46 | return memoryview(sliceable)[offset:] | |||
43 | try: |
|
47 | try: | |
44 | buffer |
|
48 | buffer | |
45 | except NameError: |
|
49 | except NameError: |
General Comments 0
You need to be logged in to leave comments.
Login now