diff options
| author | Josh Lloyd | 2019-09-25 17:53:30 +1200 |
|---|---|---|
| committer | Damien George | 2019-09-26 16:04:56 +1000 |
| commit | 7d58a197cffa7c0dd3686402d2e381812bb8ddeb (patch) | |
| tree | 5cdf657c988c65f7ada0a5b489220d51849b189f /ports | |
| parent | b596638b9b28975adee4a06a92497b5d9dbba34c (diff) | |
py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions.
Fixes #5140.
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/stm32/pin.c | 4 | ||||
| -rw-r--r-- | ports/unix/coverage-frzmpy/frzqstr.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ports/stm32/pin.c b/ports/stm32/pin.c index a8068d899..d032d9914 100644 --- a/ports/stm32/pin.c +++ b/ports/stm32/pin.c @@ -214,14 +214,14 @@ STATIC void pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t mp_print_str(print, qstr_str(mode_qst)); // pull mode - qstr pull_qst = MP_QSTR_NULL; + qstr pull_qst = MP_QSTRnull; uint32_t pull = pin_get_pull(self); if (pull == GPIO_PULLUP) { pull_qst = MP_QSTR_PULL_UP; } else if (pull == GPIO_PULLDOWN) { pull_qst = MP_QSTR_PULL_DOWN; } - if (pull_qst != MP_QSTR_NULL) { + if (pull_qst != MP_QSTRnull) { mp_printf(print, ", pull=Pin.%q", pull_qst); } diff --git a/ports/unix/coverage-frzmpy/frzqstr.py b/ports/unix/coverage-frzmpy/frzqstr.py new file mode 100644 index 000000000..051f2a9c1 --- /dev/null +++ b/ports/unix/coverage-frzmpy/frzqstr.py @@ -0,0 +1,3 @@ +# Checks for regression on MP_QSTR_NULL +def returns_NULL(): + return "NULL" |
