This website requires JavaScript.
Odkrywaj
Pomoc
Zarejestruj się
Zaloguj się
mirror
/
micropython
kopia lustrzana
https://github.com/micropython/micropython
Obserwuj
1
Polub
0
Forkuj
You've already forked micropython
0
Kod
Zgłoszenia
Projekty
Wydania
Wiki
Aktywność
c2ea8b2f98
micropython
/
tests
/
extmod
/
machine1.py.exp
9 wiersze
87 B
Plaintext
Czysty
Zwykły widok
Historia
Unescape
Escape
tests: Add test for machine module (mem* functions).
2015-05-07 23:18:28 +00:00
<8-bit memory>
ValueError
ValueError
TypeError
extmod/machine_mem: Only allow integers in machine.memX subscript. Prior to this change machine.mem32['foo'] (or using any other non-integer subscript) could result in a fault due to 'foo' being interpreted as an integer. And when writing code it's hard to tell if the fault is due to a bad subscript type, or an integer subscript that specifies an invalid memory address. The type of the object used in the subscript is now tested to be an integer by using mp_obj_get_int_truncated instead of mp_obj_int_get_truncated. The performance hit of this change is minimal, and machine.memX objects are more for convenience than performance (there are many other ways to read/write memory in a faster way), Fixes issue #6588.
2020-10-31 02:34:58 +00:00
TypeError
TypeError
TypeError
TypeError