summaryrefslogtreecommitdiff
path: root/py/modstruct.c
diff options
context:
space:
mode:
authorAndreas Motl <andreas@terkin.org>2020-03-23 04:07:13 +0100
committerDamien George <damien.p.george@gmail.com>2020-03-25 01:09:14 +1100
commitfbfea3b44007a2186468a57b0a27062d1060085d (patch)
tree53e31792fa838f47de1f01a8627cafccca80e817 /py/modstruct.c
parent2f7d2bb3e20cb1a9034c1eabeff1e7fd6caaed78 (diff)
drivers/onewire: Fix undefined variable errors.
On CPython, and with pylint, the variables MATCH_ROM and SEARCH_ROM are undefined. This code works in MicroPython because these variables are constants and the MicroPython parser/compiler optimises them out. But it is not valid Python because they are technically undefined within the scope they are used. This commit makes the code valid Python code. The const part is removed completely because these constants are part of the public API and so cannot be moved to the global scope (where they could still use the MicroPython const optimisation).
Diffstat (limited to 'py/modstruct.c')
0 files changed, 0 insertions, 0 deletions