kopia lustrzana https://github.com/micropython/micropython-lib
ffilib: Port .bitness from _libc.
rodzic
281feeb6d9
commit
937cbf330c
|
@ -30,3 +30,12 @@ def open(name, maxver=10, extra=()):
|
|||
|
||||
def libc():
|
||||
return open("libc", 6)
|
||||
|
||||
# Find out bitness of the platform, even if long ints are not supported
|
||||
# TODO: All bitness differences should be removed from micropython-lib, and
|
||||
# this snippet too.
|
||||
bitness = 1
|
||||
v = sys.maxsize
|
||||
while v:
|
||||
bitness += 1
|
||||
v >>= 1
|
||||
|
|
Ładowanie…
Reference in New Issue