kopia lustrzana https://github.com/micropython/micropython-lib
os: os.read() should return immutable value suitable e.g. for hashing.
Converting bytearray to bytes is of course not memory-efficient, so os.read() is good candidate for native implementation.pull/26/head
rodzic
568db3c1af
commit
10a4cfc757
|
@ -158,7 +158,7 @@ def read(fd, n):
|
|||
buf = bytearray(n)
|
||||
r = read_(fd, buf, n)
|
||||
check_error(r)
|
||||
return buf[:r]
|
||||
return bytes(buf[:r])
|
||||
|
||||
def write(fd, buf):
|
||||
r = write_(fd, buf, len(buf))
|
||||
|
|
Ładowanie…
Reference in New Issue